Пример #1
0
 public UnitOfWork()
 {
     _dbContext         = new ApplicationDbContext();
     MovieRepository    = new MovieRepository(_dbContext);
     CategoryRepository = new CategoryRepository(_dbContext);
 }
 public UnitOfWork(ApplicationDbContext dbContext)
 {
     _dbContext = dbContext;
     Movies     = new MovieRepository(_dbContext);
     Categories = new CategoryRepository(_dbContext);
 }