Interface IExecutableQueryHandler
Manager for executable query execution.
public interface IExecutableQueryHandler
Methods
ExecuteDeleteAsync<TEntity>(IQueryable<TEntity>, CancellationToken)
Asynchronously deletes database rows for the entity instances which match the LINQ query from the database.
Task<QueryResult<int>> ExecuteDeleteAsync<TEntity>(IQueryable<TEntity> source, CancellationToken cancellationToken = default)
Parameters
sourceIQueryable<TEntity>The source query.
cancellationTokenCancellationTokenA CancellationToken to observe while waiting for the task to complete.
Returns
- Task<QueryResult<int>>
The total number of rows deleted in the database.
Type Parameters
TEntityThe entity type.
ExecuteDelete<TEntity>(IQueryable<TEntity>)
Deletes all database rows for the entity instances which match the LINQ query from the database.
QueryResult<int> ExecuteDelete<TEntity>(IQueryable<TEntity> source)
Parameters
sourceIQueryable<TEntity>The source query.
Returns
- QueryResult<int>
The total number of rows deleted in the database.
Type Parameters
TEntityThe entity type.
ExecuteUpdateAsync<TEntity>(IQueryable<TEntity>, Action<UpdateSettersBuilder<TEntity>>, CancellationToken)
Asynchronously updates database rows for the entity instances which match the LINQ query from the database.
Task<QueryResult<int>> ExecuteUpdateAsync<TEntity>(IQueryable<TEntity> source, Action<UpdateSettersBuilder<TEntity>> updateSettersBuilder, CancellationToken cancellationToken = default)
Parameters
sourceIQueryable<TEntity>The source query.
updateSettersBuilderAction<UpdateSettersBuilder<TEntity>>A builder to configure the properties to update.
cancellationTokenCancellationTokenA CancellationToken to observe while waiting for the task to complete.
Returns
- Task<QueryResult<int>>
The total number of rows updated in the database.
Type Parameters
TEntityThe entity type.
ExecuteUpdate<TEntity>(IQueryable<TEntity>, Action<UpdateSettersBuilder<TEntity>>)
Updates all database rows for the entity instances which match the LINQ query from the database.
QueryResult<int> ExecuteUpdate<TEntity>(IQueryable<TEntity> source, Action<UpdateSettersBuilder<TEntity>> updateSettersBuilder)
Parameters
sourceIQueryable<TEntity>The source query.
updateSettersBuilderAction<UpdateSettersBuilder<TEntity>>A builder to configure the properties to update.
Returns
- QueryResult<int>
The total number of rows updated in the database.
Type Parameters
TEntityThe entity type.