Esempio n. 1
0
 public IActionResult OnGet(int id)
 {
     resturant = resturantService.SearchById(id);
     if (resturant.Equals(null))
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
Esempio n. 2
0
 public IActionResult OnPost(int id)
 {
     resturant = resturantService.Delete(id);
     if (resturant.Equals(null))
     {
         return(RedirectToPage("./NotFound"));
     }
     resturantService.commit();
     TempData["Message"] = $" {resturant.Name} resturant Deleted successfully!";
     return(RedirectToPage("List"));
 }