コード例 #1
0
 public IActionResult OnPost()
 {
     if (ModelState.IsValid)
     {
         ResturantService.AddResturant(ResturantToAdd);
         TempData["Message"] = "Added successfully!";
         ResturantService.commit();
         return(RedirectToPage("List"));
     }
     else
     {
         TempData["Message"] = "some thing went wrong!";
         Cusines             = Helper.GetEnumSelectList <CusineType>();
         return(Page());
     }
 }
コード例 #2
0
 public ResturantController(ResturantService _resturantService)
 {
     resturantService = _resturantService;
 }