Show / Hide Table of Contents

Class CreateEntityCommand

Base class for create entity commands.

Inheritance
System.Object
Loggable
DataCommandBase<ICreateEntityContext, ICreateEntityResult>
CreateEntityCommand
Implements
ILoggable
ICreateEntityCommand
IDataCommand<ICreateEntityContext, ICreateEntityResult>
IDataCommand
IAsyncOperation
Inherited Members
DataCommandBase<ICreateEntityContext, ICreateEntityResult>.ExecuteAsync(ICreateEntityContext, CancellationToken)
DataCommandBase<ICreateEntityContext, ICreateEntityResult>.IDataCommand.ExecuteAsync(IDataOperationContext, CancellationToken)
DataCommandBase<ICreateEntityContext, ICreateEntityResult>.IAsyncOperation.ExecuteAsync(IContext, CancellationToken)
DataCommandBase<ICreateEntityContext, ICreateEntityResult>.GetIdEqualityExpression<T>(IDataContext, Object)
DataCommandBase<ICreateEntityContext, ICreateEntityResult>.TryGetLocalCache(IDataContext)
DataCommandBase<ICreateEntityContext, ICreateEntityResult>.TryGetEntityActivator(IDataContext)
Loggable.Logger
Loggable.GetLogger()
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 Source

CreateEntityCommand(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 Source

BehaviorProvider

Gets the behavior provider.

Declaration
public IDataBehaviorProvider BehaviorProvider { get; }
Property Value
Type Description
IDataBehaviorProvider

The behavior provider.

Methods

| Improve this Doc View Source

CreateEntity(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.

| Improve this Doc View Source

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.

Implements

ILoggable
ICreateEntityCommand
IDataCommand<TOperationContext, TResult>
IDataCommand
IAsyncOperation

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX