Interface IQueryCommandBuilder<TEntity, TReturn>
Represents a command builder to configure the query.
Inherited Members
Namespace: Venflow.Commands
Assembly: Venflow.dll
Syntax
public interface IQueryCommandBuilder<TEntity, TReturn> : ISpecficVenflowCommandBuilder<IQueryCommand<TEntity, TReturn>, IBaseQueryRelationBuilder<TEntity, TEntity, TReturn>> where TEntity : class, new()
where TReturn : class, new()
Type Parameters
Name | Description |
---|---|
TEntity | The type of the entity which will be queried. |
TReturn | The return type of the query. |
Methods
| Improve this Doc View SourceQueryAsync(CancellationToken)
Asynchronously performs queries and materializes the result.
Declaration
Task<TReturn> QueryAsync(CancellationToken cancellationToken = null)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token, which is used to cancel the operation |
Returns
Type | Description |
---|---|
Task<TReturn> | A task representing the asynchronous operation, with the materialized result of the query; null otherwise. |
TrackChanges(Boolean)
Determines whether or not to return change tracked entities from the query.
Declaration
IBaseQueryRelationBuilder<TEntity, TEntity, TReturn> TrackChanges(bool trackChanges = true)
Parameters
Type | Name | Description |
---|---|---|
Boolean | trackChanges | Determines if change tracking should be applied. |
Returns
Type | Description |
---|---|
IBaseQueryRelationBuilder<TEntity, TEntity, TReturn> | An object that can be used to further configure the operation. |