public IActionResult OnGet(int id) { resturant = resturantService.SearchById(id); if (resturant.Equals(null)) { return(RedirectToPage("./NotFound")); } return(Page()); }
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")); }