public DapperClient CreateClient(string dbkey) { if (dbkey == null) { throw new ArgumentNullException(nameof(dbkey)); } var client = new DapperClient(new ConnectionProvider { }); var option = _optionsMonitor.Get(dbkey).DapperActions.FirstOrDefault(); if (option != null) { option(client.CurrentConnectionConfig); } else { throw new ArgumentNullException(nameof(option)); } return(client); }
public DBAccess(IDapperFactory dapperFactory) { _SqlDB = dapperFactory.CreateClient(dapperFactory.DBKey); }
public DTService(IDapperFactory dapperFactory) { _SqlDB = dapperFactory.CreateClient(dapperFactory.DBKey); }