Interface IOnPersistBehavior
Contract for the behavior invoked upon persist operation.
Namespace: Kephas.Data.Behaviors
Assembly: Kephas.Data.dll
Syntax
public interface IOnPersistBehavior
Methods
| Improve this Doc View SourceAfterPersistAsync(Object, IEntityEntry, IDataOperationContext, CancellationToken)
Callback invoked after an entity was persisted.
Declaration
Task AfterPersistAsync(object entity, IEntityEntry entityEntry, IDataOperationContext operationContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Object | entity | The entity to be persisted. |
IEntityEntry | entityEntry | The entity entry. |
IDataOperationContext | operationContext | The operation context. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task. |
BeforePersistAsync(Object, IEntityEntry, IDataOperationContext, CancellationToken)
Callback invoked before an entity is being persisted.
Declaration
Task BeforePersistAsync(object entity, IEntityEntry entityEntry, IDataOperationContext operationContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Object | entity | The entity to be persisted. |
IEntityEntry | entityEntry | The entity entry. |
IDataOperationContext | operationContext | The operation context. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A Task. |