Пример #1
0
 public UnitOfWork()
 {
     _context                        = new ECommerceDemoContext();
     ProudctRepositry                = new GenericRepository <Product>(_context);
     ProudctCategoryRepositry        = new GenericRepository <ProductCategory>(_context);
     ProudctAttributeRepositry       = new GenericRepository <ProductAttribute>(_context);
     ProudctAttributeLookupRepositry = new GenericRepository <ProductAttributeLookup>(_context);
 }
Пример #2
0
 public GenericRepository(ECommerceDemoContext context)
 {
     this.context = context;
     this.dbSet   = context.Set <T>();
 }
Пример #3
0
 public ProductCategoryRepository(ECommerceDemoContext context)
 {
     _context = context;
 }
Пример #4
0
 public BaseRepository(ECommerceDemoContext context)
 {
     _context = context;
 }
Пример #5
0
 public ProductRepository(ECommerceDemoContext context) : base(context)
 {
     _context = context;
 }