Ejemplo n.º 1
0
 public ActionResult AddInventory(InventoryViewModel model)
 {
     if (ModelState.IsValid)
     {
         InventoryRepository inventoryRepository = new InventoryRepository(new ApplicationDbContext());
         inventoryRepository.Create(model);
         return RedirectToAction("Inventories");
     }
     return View(model);
 }
Ejemplo n.º 2
0
 public ActionResult AddInventory()
 {
     var model = new InventoryViewModel();
     return View(model);
 }