public ProductController()
 {
     context             = new OrderManagmentContext();
     _uow                = new EFUnitOfWork(context);
     _productRepository  = new EFRepository <Product>(context);
     _categoryRepository = new EFRepository <Category>(context);
 }
 public CustomerController()
 {
     context             = new OrderManagmentContext();
     _uow                = new EFUnitOfWork(context);
     _customerRepository = new EFRepository <Customer>(context);
 }
Пример #3
0
        public EFUnitOfWork(OrderManagmentContext context)
        {
            Database.SetInitializer <OrderManagmentContext>(null);

            _Context = context;
        }
Пример #4
0
 public EFRepository(OrderManagmentContext Context)
 {
     this._Context = Context;
     this._DBSet   = Context.Set <T>();
 }