private void CommitChangesAddedItems(HashSet <T> items) { GeneratePrimaryKeys(items); using (DbCommand command = _commandGenerator.GetInsertCommand()) { foreach (T item in items) { _commandGenerator.FillCommand(command, item); _provider.ExecuteNonQueryCommand(command); } } }
private async Task ExecuteNonQueryAsync(DbCommand command, bool useAsync) { if (useAsync) { await _provider.ExecuteNonQueryCommandAsync(command); } else { _provider.ExecuteNonQueryCommand(command); } }
private async Task ExecuteNonQueryAsync(DbCommand command, bool useAsync, CancellationToken cancellationToken = default) { if (useAsync) { await _provider.ExecuteNonQueryCommandAsync(command, cancellationToken); } else { _provider.ExecuteNonQueryCommand(command); } }