public override async Task <int> ExecuteOnAsync(IAsyncCommandChannel on) { var affectedLines = await base.ExecuteOnAsync(on); if (affectedLines != _values) { throw new Exception($"Tentative d'insertion de {_values} lignes, seulement {affectedLines} insérée(s)"); } return(affectedLines); }
public virtual async Task <TResultType> ExecuteOnAsync(IAsyncCommandChannel on) => await _executor.ExecuteOnAdapterAsync(on, Statement.Sql, Statement.Parameters);
public async Task <bool> ExecuteOnAdapterAsync(IAsyncCommandChannel adapter, string sql, IEnumerable <KeyValuePair <string, IConvertible> > parameters = null) { var value = await adapter.FetchValueAsync(sql, parameters); return(Convert.ToBoolean(value)); }
public async Task <int> ExecuteOnAdapterAsync(IAsyncCommandChannel adapter, string sql, IEnumerable <KeyValuePair <string, IConvertible> > parameters = null) => await adapter.ExecuteAsync(sql, parameters);
public async Task <IReadOnlyDictionary <string, IConvertible> > ExecuteOnAdapterAsync(IAsyncCommandChannel adapter, string sql, IEnumerable <KeyValuePair <string, IConvertible> > parameters = null) => await adapter.FetchLineAsync(sql, parameters);
public static async Task <IConvertible> ExecuteOnAndReturnRowIdAsync(this ITableInsert insert, IAsyncCommandChannel on) { await insert.ExecuteOnAsync(on); return(await on.LastInsertedIdAsync()); }
public AsyncCommandChannelLogger(IAsyncCommandChannel logged, ILogger <IAsyncCommandChannel> logger) { _logged = logged; _logger = logger; }
public async Task <IReadOnlyList <IConvertible> > ExecuteOnAdapterAsync(IAsyncCommandChannel adapter, string sql, IEnumerable <KeyValuePair <string, IConvertible> > parameters = null) { var lines = await adapter.FetchLinesAsync(sql, parameters); return(ParseResultLines(lines)); }