예제 #1
0
 public RetryingDbConnection(DataConnection dataConnection, IAsyncDbConnection connection, IRetryPolicy policy)
 {
     _dataConnection = dataConnection;
     _connection     = connection;
     _dbConnection   = (DbConnection)connection.Connection;
     _policy         = policy;
 }
예제 #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposedValue)
            {
                if (disposing)
                {
                    Connection?.Dispose();
                    Connection = null;
                }

                _disposedValue = true;
            }
        }
예제 #3
0
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposedValue)
            {
                if (disposing)
                {
                    _context?.Dispose();
                    _context = null;

                    _conn?.Dispose();
                    _conn = null;
                }

                _disposedValue = true;
            }
        }
예제 #4
0
 public UnitOfWork(TemplateContext context, IAsyncDbConnection conn)
 {
     _context       = context ?? throw new ArgumentNullException(nameof(context));
     _conn          = conn ?? throw new ArgumentNullException(nameof(conn));
     _disposedValue = false;
 }
예제 #5
0
 protected QueryRepositoryBase(IAsyncDbConnection connection)
 {
     _disposedValue = false;
     Connection     = connection ?? throw new ArgumentNullException(nameof(connection));
 }