public ActionResult Create(HotelReservationViewModel hotelReservationViewModel) { if (ModelState.IsValid) { try { HotelReservationDTO newReservation = new HotelReservationDTO() { ClientName = User.Identity.Name, StartDate = hotelReservationViewModel.StartDate, EndDate = hotelReservationViewModel.EndDate, Hotel = hotelService.FindById(hotelReservationViewModel.HotelId), NumberOfPersons = hotelReservationViewModel.NumberOfPersons }; hotelReservationService.Reserve(newReservation); return(RedirectToAction("Index", "Hotel")); } catch (Exception e) { ModelState.AddModelError("", e.Message); } } return(View(hotelReservationViewModel)); }