public async Task <IActionResult> OrderForm(Desserts d) { if (ModelState.IsValid) { await DessertsDb.UpdateDessertAsync(_context, d); TempData["WasSuccessful"] = "You have successfully ordered items for DisneyCafe"; return(RedirectToAction("Index", "Home")); } return(View(d)); }
public async Task <IActionResult> OrderForm(int id) { Desserts dessert = await DessertsDb.GetDessertsById(_context, id); return(View(dessert)); }
public async Task <IActionResult> Index() { List <Desserts> desserts = await DessertsDb.GetDessertsAsync(_context); return(View(desserts)); }