Exemplo n.º 1
0
 public UnitOfWork(ApplicationDbContext ctx)
 {
     _ctx           = ctx;
     Blog           = new BlogRepository(_ctx);
     Product        = new ProductRepository(_ctx);
     ProductImage   = new ProductImagesRepository(_ctx);
     GlobalSettings = new GlobalValuesRepository(_ctx);
     BlogTypes      = new BlogTypeRepository(_ctx);
     ClientReviews  = new ClientReviewsRepository(_ctx);
     Lead           = new LeadRepository(_ctx);
     WebsiteContent = new WebsiteContentRepository(_ctx);
 }
Exemplo n.º 2
0
 public XaPaUnitOfWork(XaPaDataContext context)
 {
     _context      = context;
     Categories    = new CategoriesRepository(_context);
     OrderDetails  = new OrderDetailsRepository(_context);
     Orders        = new OrdersRepository(_context);
     ProductImages = new ProductImagesRepository(_context);
     Products      = new ProductsRepository(_context);
     Users         = new UsersRepository(_context);
     UserTitles    = new UserTitlesRepository(_context);
     UserTokens    = new UserTokensRepository(_context);
 }