Class DataAnnotationsBehaviorBase<TEntity>
Base class for data behaviors resulting from property annotations, like any type of validations.
Implements
IDataBehavior<TEntity>
    
    
    
    
  Inherited Members
      System.Object.Equals(System.Object)
    
    
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetHashCode()
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
    
      System.Object.ToString()
    
  Namespace: Kephas.Data.Behaviors
Assembly: Kephas.Data.dll
Syntax
public abstract class DataAnnotationsBehaviorBase<TEntity> : DataBehaviorBase<TEntity>, ILoggable, IDataBehavior<TEntity>, IDataBehavior, IOnPersistBehavior, IOnInitializeBehavior, IOnValidateBehaviorType Parameters
| Name | Description | 
|---|---|
| TEntity | Type of the entity. | 
Methods
| Improve this Doc View SourceCreateValidationFn(ITypeInfo)
Creates the validation function.
Declaration
protected virtual Func<object, IEntityEntry, IDataOperationContext, IDataValidationResult> CreateValidationFn(ITypeInfo typeInfo)Parameters
| Type | Name | Description | 
|---|---|---|
| ITypeInfo | typeInfo | Information describing the type. | 
Returns
| Type | Description | 
|---|---|
| System.Func<System.Object, IEntityEntry, IDataOperationContext, IDataValidationResult> | The new validation function. | 
Validate(TEntity, IEntityEntry, IDataOperationContext)
Callback invoked after upon entity validation.
Declaration
public override IDataValidationResult Validate(TEntity entity, IEntityEntry entityEntry, IDataOperationContext operationContext)Parameters
| Type | Name | Description | 
|---|---|---|
| TEntity | entity | The entity. | 
| IEntityEntry | entityEntry | The entity entry. | 
| IDataOperationContext | operationContext | The operation context. | 
Returns
| Type | Description | 
|---|---|
| IDataValidationResult | 
Overrides
Kephas.Data.Behaviors.DataBehaviorBase<TEntity>.Validate(TEntity, Kephas.Data.Capabilities.IEntityEntry, Kephas.Data.IDataOperationContext)