public IActionResult AddSuggestion(RestaurantSuggestion newSuggestion) { if (ModelState.IsValid) { TempStorage.AddSuggestion(newSuggestion); return(View("Confirmation", newSuggestion)); } else { return(View()); } }
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()); } }
public IActionResult SubmitSuggestions(RestaurantSuggestion restaurantLists) { TempStorage.AddApplication(restaurantLists); //Debug.WriteLine("Name: " + appResponse.Name); return(View("Confirmation", restaurantLists)); //"Confirmation", appResponse }