Exemple #1
0
 public IntelligentCookingUnitOfWork(IntelligentCookingContext context)
 {
     _context        = context;
     Categories      = new CategoryRepository(_context);
     Ingredients     = new IngredientRepository(_context);
     Dishes          = new DishRepository(_context);
     DishCategories  = new DishCategoryRepository(_context);
     DishIngredients = new DishIngredientRepository(_context);
     Favourites      = new FavouriteRepository(_context);
     Ratings         = new RatingRepository(_context);
     Users           = new UserRepository(_context);
     RefreshTokens   = new RefreshTokenRespository(_context);
 }
 public UnitOfWork(DataContext dataContext)
 {
     _dataContext                         = dataContext;
     EmployeeRepository                   = new EmployeeRepository(_dataContext);
     CustomerRepository                   = new CustomerRepository(_dataContext);
     ProviderRepository                   = new ProviderRepository(_dataContext);
     SupplyRepository                     = new SupplyRepository(_dataContext);
     SupplyInvoiceDetailRepository        = new SupplyInvoiceDetailRepository(_dataContext);
     SupplyInvoiceRepository              = new SupplyInvoiceRepository(_dataContext);
     TableRepository                      = new TableRepository(_dataContext);
     ComboRepository                      = new ComboRepository(_dataContext);
     ComboDetailRepository                = new ComboDetailRepository(_dataContext);
     ComboImageRepository                 = new ComboImageRepository(_dataContext);
     DishSuppliesRepository               = new DishSuppliesRepository(_dataContext);
     DishRepository                       = new DishRepository(_dataContext);
     DishCategoryRepository               = new DishCategoryRepository(_dataContext);
     DishImageRepository                  = new DishImageRepository(_dataContext);
     OrderRepository                      = new OrderRepository(_dataContext);
     OrderTypeRepository                  = new OrderTypeRepository(_dataContext);
     OrderDetailRepository                = new OrderDetailRepository(_dataContext);
     CurrentInventorySupplyRepository     = new CurrentInventorySupplyRepository(_dataContext);
     InventorySupplyTransactionRepository = new InventorySupplyTransactionRepository(_dataContext);
     UserRepository                       = new UserRepository(dataContext);
 }