Example #1
0
 public ActionResult AddBeverageInventory(BeverageInventoryViewModel model)
 {
     if (ModelState.IsValid)
     {
         BeverageInventoryRepository inventoryRepository = new BeverageInventoryRepository(new ApplicationDbContext());
         inventoryRepository.Create(model);
         return RedirectToAction("BeverageInventories");
     }
     return View(model);
 }
Example #2
0
        public ActionResult BeverageInventories()
        {
            BeverageInventoryRepository inventoryRepository = new BeverageInventoryRepository(new ApplicationDbContext());

            var model = inventoryRepository.GetAll();

            return View(model);
        }