Data/CafeLib.Data.Sources.SqlServer/SqlServerCommandProvider.cs
/// <summary>
/// Bulk delete of entity records.
/// </summary>
/// <typeparam name="TEntity">Entity type</typeparam>
/// <param name="connectionInfo">Connection info</param>
/// <param name="data">Collection of entity records</param>
/// <param name="token">Cancellation token</param>
/// <returns></returns>
Bulk delete of entity records.
Bulk delete of entity records .
public async Task<int> DeleteAsync<TEntity>(IConnectionInfo connectionInfo, IEnumerable<TEntity> data, CancellationToken token = default) where TEntity : class, IEntity
        {
            await using var connection = connectionInfo.GetConnection<SqlConnection>();
            return await connection.BulkDeleteAsync(data, cancellationToken: token).ConfigureAwait(false);
        }
public async Task < int > DeleteAsync < TEntity > ( IConnectionInfo connectionInfo , IEnumerable < TEntity > data , CancellationToken token = default ) where TEntity : class , IEntity { await using var connection = connectionInfo . GetConnection < SqlConnection > ( ) ; return await connection . BulkDeleteAsync ( data , cancellationToken : token ) . ConfigureAwait ( false ) ; }
Bulk delete of entity records.
Bulk delete of entity records .
None
connectionInfo
IConnectionInfo
None
data
IEnumerable<TEntity>
Collection of entity records
Collection of entity records
token
CancellationToken
None
typeparam
None