示例#1
0
 public UnitOfWork(ApplicationDbContext db)
 {
     _db             = db;
     Category        = new CategoryRepository(_db);
     CoverType       = new CoverTypeRepository(_db);
     Product         = new ProductRepository(_db);
     Company         = new CompanyRepository(_db);
     ApplicationUser = new ApplicationUserRepository(_db);
     ShoppingCart    = new ShoppingCartRepository(_db);
     OrderDetail     = new OrderDetailRepository(_db);
     OrderHeader     = new OrderHeaderRepository(_db);
 }
示例#2
0
 public UnitOfWork(ApplicationDbContext context)
 {
     _context        = context;
     Category        = new CategoryRepository(_context);
     CoverType       = new CoverTypeRepository(_context);
     Product         = new ProductRepository(_context);
     Company         = new CompanyRepository(_context);
     ApplicationUser = new ApplicationUserRepository(_context);
     OrderHeader     = new OrderHeaderRepository(_context);
     OrderDetails    = new OrderDetailsRepository(_context);
     ShoppingCart    = new ShoppingCartRepository(_context);
     SP_CAll         = new SP_CALL(_context);
 }
示例#3
0
        public UnitOfWork(ApplicationDbContext db)
        {
            _db             = db;
            Category        = new CategoryRepository(_db);
            SubCategory     = new SubCategoryRepository(_db);
            Subss           = new SubssRepository(_db);
            Product         = new ProductRepository(_db);
            Company         = new CompanyRepository(_db);
            ApplicationUser = new ApplicationUserRepository(_db);

            ShoppingCart = new ShoppingCartRepository(_db);
            OrderDetails = new OrderDetailsRepository(_db);
            OrderHeader  = new OrderHeaderRepository(_db);
            SP_Call      = new SP_Call(_db);
        }