public IActionResult Detail(ReservationDeteailsViewModel m) { if (ModelState.IsValid) { // getting the New sitting ID based on its name Sitting s = _services.GetSittingByName(m.SittingName); // setting it to the model m.SittingID = s.SittingID; // using the model data to update the DB _services.UpdateReservation(m); // return to the Staf Page (Reservations list) return(RedirectToAction("Index")); } // stay in the details page if modelState is not valid return(View(m.ReservationID)); }