示例#1
0
        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)));
        }
示例#3
0
        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)));
        }