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); }
public EFUnitOfWork(OrderManagmentContext context) { Database.SetInitializer <OrderManagmentContext>(null); _Context = context; }
public EFRepository(OrderManagmentContext Context) { this._Context = Context; this._DBSet = Context.Set <T>(); }