Interface IDeleteCommandBuilder<TEntity>
Represents a command builder to configure the deletion.
Inherited Members
Namespace: Venflow.Commands
Assembly: Venflow.dll
Syntax
public interface IDeleteCommandBuilder<TEntity> : ISpecficVenflowCommandBuilder<IDeleteCommand<TEntity>, IDeleteCommandBuilder<TEntity>> where TEntity : class, new()
Type Parameters
| Name | Description |
|---|---|
| TEntity | The type of the entity which will be deleted. |
Methods
| Improve this Doc View SourceDeleteAsync(TEntity, CancellationToken)
Asynchronously deletes a single entity.
Declaration
ValueTask<int> DeleteAsync(TEntity entity, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TEntity | entity | The entity instance which should be deleted. |
| CancellationToken | cancellationToken | The cancellation token, which is used to cancel the operation |
Returns
| Type | Description |
|---|---|
| ValueTask<Int32> | A task representing the asynchronous operation, with the number of rows affected if known; -1 otherwise. |
DeleteAsync(TEntity[], CancellationToken)
Asynchronously deletes a set of entity.
Declaration
ValueTask<int> DeleteAsync(TEntity[] entities, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TEntity[] | entities | The entity instances which should be deleted. |
| CancellationToken | cancellationToken | The cancellation token, which is used to cancel the operation |
Returns
| Type | Description |
|---|---|
| ValueTask<Int32> | A task representing the asynchronous operation, with the number of rows affected if known; -1 otherwise. |
DeleteAsync(IEnumerable<TEntity>, CancellationToken)
Asynchronously deletes a set of entity.
Declaration
ValueTask<int> DeleteAsync(IEnumerable<TEntity> entities, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<TEntity> | entities | The entity instances which should be deleted. |
| CancellationToken | cancellationToken | The cancellation token, which is used to cancel the operation |
Returns
| Type | Description |
|---|---|
| ValueTask<Int32> | A task representing the asynchronous operation, with the number of rows affected if known; -1 otherwise. |
DeleteAsync(IList<TEntity>, CancellationToken)
Asynchronously deletes a set of entity.
Declaration
ValueTask<int> DeleteAsync(IList<TEntity> entities, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IList<TEntity> | entities | The entity instances which should be deleted. |
| CancellationToken | cancellationToken | The cancellation token, which is used to cancel the operation |
Returns
| Type | Description |
|---|---|
| ValueTask<Int32> | A task representing the asynchronous operation, with the number of rows affected if known; -1 otherwise. |
DeleteAsync(List<TEntity>, CancellationToken)
Asynchronously deletes a set of entity.
Declaration
ValueTask<int> DeleteAsync(List<TEntity> entities, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| List<TEntity> | entities | The entity instances which should be deleted. |
| CancellationToken | cancellationToken | The cancellation token, which is used to cancel the operation |
Returns
| Type | Description |
|---|---|
| ValueTask<Int32> | A task representing the asynchronous operation, with the number of rows affected if known; -1 otherwise. |