public IReadOnlyList <IReadOnlyDictionary <string, IConvertible> > FetchLines(string sql, IEnumerable <KeyValuePair <string, IConvertible> > parameters = null) { using var scope = _logger.BeginScope("Query {Guid} of type {Type}", Guid.NewGuid(), nameof(FetchLines)); var enumeratedParameters = parameters?.ToArray() ?? new KeyValuePair <string, IConvertible> [0]; LogInputParameters(sql, enumeratedParameters); var lines = _logged.FetchLines(sql, enumeratedParameters); _logger.LogDebug("{Lines} returned", lines); return(lines); }
public IReadOnlyList <IReadOnlyDictionary <string, IConvertible> > ExecuteOnAdapter(ICommandChannel adapter, string sql, IEnumerable <KeyValuePair <string, IConvertible> > parameters = null) => adapter.FetchLines(sql, parameters);
public IReadOnlyList <IConvertible> ExecuteOnAdapter(ICommandChannel adapter, string sql, IEnumerable <KeyValuePair <string, IConvertible> > parameters = null) { var resultLines = adapter.FetchLines(sql, parameters); return(ParseResultLines(resultLines)); }