public RetryingDbConnection(DataConnection dataConnection, IAsyncDbConnection connection, IRetryPolicy policy) { _dataConnection = dataConnection; _connection = connection; _dbConnection = (DbConnection)connection.Connection; _policy = policy; }
protected virtual void Dispose(bool disposing) { if (!_disposedValue) { if (disposing) { Connection?.Dispose(); Connection = null; } _disposedValue = true; } }
protected virtual void Dispose(bool disposing) { if (!_disposedValue) { if (disposing) { _context?.Dispose(); _context = null; _conn?.Dispose(); _conn = null; } _disposedValue = true; } }
public UnitOfWork(TemplateContext context, IAsyncDbConnection conn) { _context = context ?? throw new ArgumentNullException(nameof(context)); _conn = conn ?? throw new ArgumentNullException(nameof(conn)); _disposedValue = false; }
protected QueryRepositoryBase(IAsyncDbConnection connection) { _disposedValue = false; Connection = connection ?? throw new ArgumentNullException(nameof(connection)); }