public UnitOfWork(ApplicationDbContext db) { _db = db; Category = new CategoryRepository(_db); FoodType = new FoodTypeRepository(_db); MenuItem = new MenuItemRepository(_db); ApplicationUser = new ApplicationUserRepository(_db); ShoppingCart = new ShoppingCartRepository(_db); OrderHeader = new OrderHeaderRepository(_db); OrderDetails = new OrderDetailsRepository(_db); }
public UnitOfWork(ApplicationDbContext context) { _context = context; Category = new CategoryRepository(_context); FoodType = new FoodTypeRepository(_context); MenuItem = new MenuItemRepository(_context); ApplicationUser = new ApplicationUserRepository(_context); ShoppingCard = new ShoppingCardRepository(_context); OrderHeader = new OrderHeaderRepository(_context); OrderDetails = new OrderDetailsRepository(_context); }
public UnitOfWork(ApplicationDbContext applicationDbContext) { _applicationDbContext = applicationDbContext; Category = new CategoryRepository(_applicationDbContext); FoodType = new FoodTypeRepository(_applicationDbContext); MenuItem = new MenuItemRepository(_applicationDbContext); ApplicationUser = new ApplicationUserRepository(_applicationDbContext); ShoppingCart = new ShoppingCartRepository(_applicationDbContext); OrderDetail = new OrderDetailRepository(_applicationDbContext); OrderHeader = new OrderHeaderRepository(_applicationDbContext); SP_Call = new SP_Call(_applicationDbContext); }