public ActionResult Overview(int?id) { if (id == null) { return(View("Error", null)); } var model = ModelGenerator.GenerateHospitalDataModel(id); return(View(model)); }
public ActionResult Overview(ReviewInformation reviewInformation) { if (reviewInformation == null || reviewInformation.userName == null) { return(View("Error", null)); } int id = reviewInformation.hospitalId; ReviewEntry review = CreateReviewEntry(reviewInformation); if (review != null) { this.DbQueryHandler.AddReviewEntry(review); } ModelState.Clear(); var model = ModelGenerator.GenerateHospitalDataModel(id); return(View(model)); }