public async Task <IActionResult> DeleteComfirmed(int id) { Clothing c = await ClothingDB.GetClothingbyID(id, _context); await ClothingDB.Delete(id, _context); TempData["Message"] = $"{c.Title} deleted successfully"; return(RedirectToAction(nameof(ShowAll))); }
public async Task <IActionResult> ConfirmDelete(int id) { Clothing c = await ClothingDB.GetClothingById(id, _context); await ClothingDB.Delete(c, _context); TempData["Message"] = $"{c.Title}, ID#: {c.ItemID}, Deleted Successfully"; return(RedirectToAction(nameof(ShowAll))); }
public async Task <IActionResult> DeleteConfirmed(int ID) { Clothing c = await ClothingDB.GetClothingByID(ID, _context); await ClothingDB.Delete(c, _context); TempData["Message"] = $"{c.Title} deleted successfully"; return(RedirectToAction(nameof(InventoryList))); }