Class FindOneCommand
Base class for find commands retrieving one result.
Inheritance
System.Object
FindOneCommand
Implements
Inherited Members
FindCommandBase<IFindOneContext>.GetCriteriaString<T>(IFindOneContext, Expression<Func<T, Boolean>>)
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 FindOneCommand : FindCommandBase<IFindOneContext>, ILoggable, IFindOneCommand, IDataCommand<IFindOneContext, IFindResult>, IDataCommand, IAsyncOperation
Methods
| Improve this Doc View SourceExecuteAsync(IFindOneContext, CancellationToken)
Executes the data command asynchronously.
Declaration
public override Task<IFindResult> ExecuteAsync(IFindOneContext operationContext, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
IFindOneContext | operationContext | The operation context. |
System.Threading.CancellationToken | cancellationToken | The cancellation token (optional). |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<IFindResult> | A promise of a IDataCommandResult. |
Overrides
Kephas.Data.Commands.FindCommandBase<Kephas.Data.Commands.IFindOneContext>.ExecuteAsync(Kephas.Data.Commands.IFindOneContext, System.Threading.CancellationToken)
|
Improve this Doc
View Source
GetFindCriteria<T>(IFindOneContext)
Gets the find criteria.
Declaration
protected override Expression<Func<T, bool>> GetFindCriteria<T>(IFindOneContext findContext)
where T : class
Parameters
Type | Name | Description |
---|---|---|
IFindOneContext | findContext | The find context. |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression<System.Func<T, System.Boolean>> | The find criteria. |
Type Parameters
Name | Description |
---|---|
T | Generic type parameter. |
Overrides
Kephas.Data.Commands.FindCommandBase<Kephas.Data.Commands.IFindOneContext>.GetFindCriteria<T>(Kephas.Data.Commands.IFindOneContext)