Class DeleteByKeyExecutor<TEntity>
- Namespace
- Z.EntityFramework.Extensions
- Assembly
- Z.EntityFramework.Extensions.dll
Manager for delete by keys.
public class DeleteByKeyExecutor<TEntity> where TEntity : class
Type Parameters
TEntity
- Inheritance
-
DeleteByKeyExecutor<TEntity>
- Inherited Members
Constructors
DeleteByKeyExecutor(DbSet<TEntity>, IEnumerable<object>)
Constructor.
public DeleteByKeyExecutor(DbSet<TEntity> dbSet, IEnumerable<object> entitiesEnumerable)
Parameters
dbSet
DbSet<TEntity>Set the database belongs to.
entitiesEnumerable
IEnumerable<object>The entities.
Methods
Execute()
Execute the DeleteByKey logic.
public int Execute()
Returns
- int
The number of row affected.
ExecuteAsync(CancellationToken)
Executes the DeleteByKey asynchronous.
public Task<int> ExecuteAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA token that allows processing to be cancelled.
Returns
Prepare()
Prepares command that will be executed.
public void Prepare()