Class CreateEntityCommand
Base class for create entity commands.
Inheritance
System.Object
CreateEntityCommand
Implements
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.Commands
Assembly: Kephas.Data.dll
Syntax
[DataContextType(typeof(DataContextBase))]
public class CreateEntityCommand : DataCommandBase<ICreateEntityContext, ICreateEntityResult>, ILoggable, ICreateEntityCommand, IDataCommand<ICreateEntityContext, ICreateEntityResult>, IDataCommand, IAsyncOperation
Constructors
| Improve this Doc View SourceCreateEntityCommand(IDataBehaviorProvider)
Initializes a new instance of the CreateEntityCommand class.
Declaration
public CreateEntityCommand(IDataBehaviorProvider behaviorProvider)
Parameters
Type | Name | Description |
---|---|---|
IDataBehaviorProvider | behaviorProvider | The behavior provider. |
Properties
| Improve this Doc View SourceBehaviorProvider
Gets the behavior provider.
Declaration
public IDataBehaviorProvider BehaviorProvider { get; }
Property Value
Type | Description |
---|---|
IDataBehaviorProvider | The behavior provider. |
Methods
| Improve this Doc View SourceCreateEntity(ICreateEntityContext)
Creates the entity.
Declaration
protected virtual object CreateEntity(ICreateEntityContext operationContext)
Parameters
Type | Name | Description |
---|---|---|
ICreateEntityContext | operationContext | The operation context. |
Returns
Type | Description |
---|---|
System.Object | The new entity. |
ExecuteAsync(ICreateEntityContext, CancellationToken)
Executes the data command asynchronously.
Declaration
public override Task<ICreateEntityResult> ExecuteAsync(ICreateEntityContext operationContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
ICreateEntityContext | operationContext | The operation context. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ICreateEntityResult> | A promise of a ICreateEntityResult. |
Overrides
Kephas.Data.Commands.DataCommandBase<Kephas.Data.Commands.ICreateEntityContext, Kephas.Data.Commands.ICreateEntityResult>.ExecuteAsync(Kephas.Data.Commands.ICreateEntityContext, System.Threading.CancellationToken)
|
Improve this Doc
View Source
PostCreateEntity(ICreateEntityContext, ICreateEntityResult)
Overridable method called just before returning the result.
Declaration
protected virtual void PostCreateEntity(ICreateEntityContext operationContext, ICreateEntityResult result)
Parameters
Type | Name | Description |
---|---|---|
ICreateEntityContext | operationContext | The operation context. |
ICreateEntityResult | result | The result. |