public async Task <IActionResult> Edit(Clothing c) { if (ModelState.IsValid) { await ClothingDb.Edit(c, _context); //tempData last for one redirect ViewData["Msg"] = c.Title + " Updated Successfully!"; // <- Same thing, ViewBag } return(View(c)); }
public async Task <IActionResult> Edit(Clothing c) { if (ModelState.IsValid) { await ClothingDb.Edit(c, _context); ViewData["Message"] = c.Title + "Updated successfully"; return(View(c)); } return(View(c)); }