예제 #1
0
        public override NpgsqlConnection GetNewConnection()
        {
            _logger.LogTrace("开始获取新的DbConn");
            var conn = SqlConnectionManager.GetNewConnection(ConnectionName ?? "Default");

            _logger.LogTrace("获取新的DbConn结束");
            return(conn);
        }
예제 #2
0
 public SqlBaseRepository(SqlConnectionManager sqlConnectionManager,
                          SafeConnectionHelper safeConnectionHelper,
                          ILogger logger)
     : base(safeConnectionHelper, logger, timeout: sqlConnectionManager.DbSetting.Timeout ?? 10)
 {
     SqlConnectionManager = sqlConnectionManager;
     this._logger         = logger;
 }