示例#1
0
 public IActionResult Entry(RestaurantSuggestion restaurantSuggestion)
 {
     //if the model has everything entered correctly then show the suggestions view, and add the data, otherwise show the error
     if (ModelState.IsValid)
     {
         RestaurantSuggestion.AddRestaurantSuggestion(restaurantSuggestion);
         return(RedirectToAction("sug"));
     }
     else
     {
         return(View());
     }
 }