Show / Hide Table of Contents

Class DataCommandBase<TOperationContext, TResult>

Base implementation of a data command.

Inheritance
System.Object
Loggable
DataCommandBase<TOperationContext, TResult>
BulkOperationCommandBase<TOperationContext, TOperationResult>
CreateEntityCommand
ExecuteCommandBase
FindCommandBase<TFindContext>
PersistChangesCommand
SyncDataCommandBase<TOperationContext, TResult>
LLBLGenBulkDeleteCommand
LLBLGenBulkUpdateCommand
Implements
ILoggable
IDataCommand<TOperationContext, TResult>
IDataCommand
IAsyncOperation
Inherited Members
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
public abstract class DataCommandBase<TOperationContext, TResult> : Loggable, ILoggable, IDataCommand<TOperationContext, TResult>, IDataCommand, IAsyncOperation where TOperationContext : IDataOperationContext where TResult : IDataCommandResult
Type Parameters
Name Description
TOperationContext

Type of the operationContext.

TResult

Type of the result.

Methods

| Improve this Doc View Source

ExecuteAsync(TOperationContext, CancellationToken)

Executes the data command asynchronously.

Declaration
public abstract Task<TResult> ExecuteAsync(TOperationContext operationContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
TOperationContext operationContext

The operation context.

System.Threading.CancellationToken cancellationToken

The cancellation token (optional).

Returns
Type Description
System.Threading.Tasks.Task<TResult>

A promise of a IDataCommandResult.

| Improve this Doc View Source

GetIdEqualityExpression<T>(IDataContext, Object)

Gets the equality expression for of: t => t.Id == entityEntry.Id.

Declaration
protected virtual Expression<Func<T, bool>> GetIdEqualityExpression<T>(IDataContext dataContext, object entityId)
Parameters
Type Name Description
IDataContext dataContext

Context for the data.

System.Object entityId

The entity ID.

Returns
Type Description
System.Linq.Expressions.Expression<System.Func<T, System.Boolean>>

The equality expression.

Type Parameters
Name Description
T

The entity type.

| Improve this Doc View Source

TryGetEntityActivator(IDataContext)

Tries to get the data context's entity activator.

Declaration
protected virtual IActivator TryGetEntityActivator(IDataContext dataContext)
Parameters
Type Name Description
IDataContext dataContext

Context for the data.

Returns
Type Description
IActivator

An IActivator.

| Improve this Doc View Source

TryGetLocalCache(IDataContext)

Tries to get the data context's local cache.

Declaration
protected virtual IDataContextCache TryGetLocalCache(IDataContext dataContext)
Parameters
Type Name Description
IDataContext dataContext

Context for the data.

Returns
Type Description
IDataContextCache

An IDataContextCache.

Explicit Interface Implementations

| Improve this Doc View Source

IDataCommand.ExecuteAsync(IDataOperationContext, CancellationToken)

Executes the data command asynchronously.

Declaration
Task<IDataCommandResult> IDataCommand.ExecuteAsync(IDataOperationContext operationContext, CancellationToken cancellationToken)
Parameters
Type Name Description
IDataOperationContext operationContext

The operation context.

System.Threading.CancellationToken cancellationToken

The cancellation token (optional).

Returns
Type Description
System.Threading.Tasks.Task<IDataCommandResult>

A promise of a IDataCommandResult.

| Improve this Doc View Source

IAsyncOperation.ExecuteAsync(IContext, CancellationToken)

Executes the asynchronous operation.

Declaration
Task<object> IAsyncOperation.ExecuteAsync(IContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IContext context

Optional. The context.

System.Threading.CancellationToken cancellationToken

Optional. The cancellation token (optional).

Returns
Type Description
System.Threading.Tasks.Task<System.Object>

An asynchronous result.

Exceptions
Type Condition
DataException

Thrown when a Data error condition occurs.

Implements

ILoggable
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