Interface IOnValidateBehavior
Contract for the behavior invoked upon entity validation.
Namespace: Kephas.Data.Validation
Assembly: Kephas.Data.dll
Syntax
public interface IOnValidateBehavior
Methods
| Improve this Doc View SourceValidateAsync(Object, IEntityEntry, IDataOperationContext, CancellationToken)
Validates the provided instance asynchronously.
Declaration
Task<IDataValidationResult> ValidateAsync(object entity, IEntityEntry entityEntry, IDataOperationContext operationContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Object | entity | The entity to be validated. |
IEntityEntry | entityEntry | The entity entry. |
IDataOperationContext | operationContext | Context for the validation operation. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IDataValidationResult> | A promise of a IDataValidationResult. |