public override NpgsqlConnection GetNewConnection() { _logger.LogTrace("开始获取新的DbConn"); var conn = SqlConnectionManager.GetNewConnection(ConnectionName ?? "Default"); _logger.LogTrace("获取新的DbConn结束"); return(conn); }
public SqlBaseRepository(SqlConnectionManager sqlConnectionManager, SafeConnectionHelper safeConnectionHelper, ILogger logger) : base(safeConnectionHelper, logger, timeout: sqlConnectionManager.DbSetting.Timeout ?? 10) { SqlConnectionManager = sqlConnectionManager; this._logger = logger; }