Example #1
0
 public RequisitionService()
 {
     _context               = new SCHMDbContext();
     _storeUnitOfWork       = new StoreUnitOfWork(_context);
     _ProductUnitOfWork     = new ProductUnitOfWork(_context);
     _RequisitionUnitOfWork = new RequisitionUnitOfWork(_context);
 }
Example #2
0
        public ActionResult About()
        {
            SmartShopContext  db  = new SmartShopContext();
            ProductUnitOfWork uow = new ProductUnitOfWork(db);

            Product p = new Product();

            p.ProductName  = "Shovon";
            p.ProductPrice = 100;

            uow.ProductRepository.Add(p);

            uow.Save();

            uow.ProductRepository.GetAll();

            ViewBag.Message = "Your application description page.";

            return(View());
        }
Example #3
0
 public ProductService()
 {
     _context           = new SCHMDbContext();
     _ProductUnitOfWork = new ProductUnitOfWork(_context);
 }
Example #4
0
 public StoreService()
 {
     _context           = new SCHMDbContext();
     _storeUnitOfWork   = new StoreUnitOfWork(_context);
     _ProductUnitOfWork = new ProductUnitOfWork(_context);
 }