public IActionResult Delete(MemoryDeleteVM memoryDeleteVM, int id)
 {
     //if(submit-button clicked)
     {
         service.DeleteMemory(memoryDeleteVM, id);
     }
     return(RedirectToAction(nameof(Index)));
 }
Пример #2
0
        public ActionResult DeleteMemory(int id)
        {
            var service = new MemoryService();

            service.DeleteMemory(id);
            TempData["SaveResult"] = "Your Memory entry was deleted.";

            return(RedirectToAction("Index"));
        }