Table of Contents

Interface IExecutableQueryHandler

Namespace
GroupeIsa.Neos.Shared.Linq
Assembly
GroupeIsa.Neos.Shared.dll

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

source IQueryable<TEntity>

The source query.

cancellationToken CancellationToken

A 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

TEntity

The 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

source IQueryable<TEntity>

The source query.

Returns

QueryResult<int>

The total number of rows deleted in the database.

Type Parameters

TEntity

The 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

source IQueryable<TEntity>

The source query.

updateSettersBuilder Action<UpdateSettersBuilder<TEntity>>

A builder to configure the properties to update.

cancellationToken CancellationToken

A 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

TEntity

The 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

source IQueryable<TEntity>

The source query.

updateSettersBuilder Action<UpdateSettersBuilder<TEntity>>

A builder to configure the properties to update.

Returns

QueryResult<int>

The total number of rows updated in the database.

Type Parameters

TEntity

The entity type.