Beispiel #1
0
 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);
 }
Beispiel #2
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context                  = context;
     CategoryRepository        = new CategoryRepository(context);
     FoodTypeRepository        = new FoodTypeRepository(context);
     MenuItemRepository        = new MenuItemRepository(context);
     ApplicationUserRepository = new ApplicationUserRepository(context);
     ShoppingCartRepository    = new ShoppingCartRepository(context);
     OrderDetailsRepository    = new OrderDetailsRepository(context);
     OrderHeaderRepository     = new OrderHeaderRepository(context);
     SpCall = new SP_Call(context);
 }
Beispiel #3
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context        = context;
     Category        = new CategoryRepository(_context);
     CoverType       = new CoverTypeRepository(_context);
     SP_Call         = new Sp_Call(_context);
     Product         = new ProductRepositroy(_context);
     Company         = new CompanyRepository(_context);
     ApplicationUser = new ApplicationUserRepository(_context);
     OrderDetails    = new OrderDetailsRepository(_context);
     OrderHeader     = new OrderHeaderRepository(_context);
     ShoppingCart    = new ShoppingCartRepository(_context);
 }