private ShoesDbContext _context;  // Dependecy Injection
 public UnitOfWork_Class(ShoesDbContext context)
 {
     _context = context;
     //
     CategoryDal    = new EfCategoryDal();
     BrandDal       = new EfBrandDal();
     CarouselDal    = new EfCarouselDal();
     ProductDal     = new EfProductDal();
     ProductSizeDal = new EfProductSizeDal();
     RoleDal        = new EfRoleDal();
     SizeDal        = new EfSizeDal();
     UserDal        = new EfUserDal();
 }
Ejemplo n.º 2
0
 public UnitOfWork(DataAccessLayer.DAL.DatabaseContext context)
 {
     _context = context;
     // ONEMLI!!
     BasketDal      = new EfBasketDal(_context);
     BuyDal         = new EfBuyDal(_context);
     CategoryDal    = new EfCategoryDal(_context);
     ColorsDal      = new EfColorsDal(_context);
     CustomerDal    = new EfCustomerDal(_context);
     FavsDal        = new EfFavsDal(_context);
     ImagesDal      = new EfImagesDal(_context);
     ProductDal     = new EfProductDal(_context);
     RolesDal       = new EfRolesDal(_context);
     SizeDal        = new EfSizeDal(_context);
     SubCategoryDal = new EfSubCategoryDal(_context);
     BrandDal       = new EfBrandDal(_context);
 }
Ejemplo n.º 3
0
 public UnitofWork(DatabaseContext context)
 {
     _context       = context;
     CategoryDal    = new EfCategoryDal(_context);
     BasketDal      = new EfBasketDal(_context);
     BillAdressDal  = new EfBillAdressDal(_context);
     BrandDal       = new EfBrandDal(_context);
     ColorsDal      = new EfColorsDal(_context);
     CommentsDal    = new EfCommentsDal(_context);
     CredicartDal   = new EfCredicartDal(_context);
     CustomerDal    = new EfCustomerDal(_context);
     DiscountDal    = new EfDiscountDal(_context);
     FavDal         = new EfFavDal(_context);
     HomeSliderDal  = new EfHomeSliderDal(_context);
     ImageFilesDal  = new EfImageFilesDal(_context);
     ProductDal     = new EfProductDal(_context);
     SalesDal       = new EfSalesDal(_context);
     SizeDal        = new EfSizeDal(_context);
     SubCategoryDal = new EfSubCategoryDal(_context);
 }