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