public UnitOfWorkX(DataBaseInfo dataBaseInfo) { _dbContext = DbContexts.CreateDbContext <TContext>(dataBaseInfo).Result; _dbUnitOfWork = new UnitOfWork <TContext>(_dbContext); _dbContextTransaction = _dbContext.Database.BeginTransaction(); }
public UnitOfWorkX(DataBaseType dataBaseType, string connectionString) { _dbContext = DbContexts.CreateDbContext <TContext>(GetDataBaseInfo(dataBaseType, connectionString)).Result; _dbUnitOfWork = new UnitOfWork <TContext>(_dbContext); _dbContextTransaction = _dbContext.Database.BeginTransaction(); }