public ActionResult Create(Appointment appointment) { if (_repo.isAppointmentAvailable(appointment)) { if (_custRepo.ThisCustomerExists(appointment.CustomerId)) { if (_custRepo.CustNameFitsId(appointment.CustomerId, appointment.CustomerName)) { if (_servRepo.ThisProviderExists(appointment.ProviderId)) { if (_servRepo.ProvNameFitsId(appointment.ProviderId, appointment.ProviderName)) { _repo.Add(appointment); return(RedirectToAction(nameof(Index))); } else { ModelState.AddModelError("ProviderName", "Your selected ProviderID and ProviderName do not match with our database TRY AGAIN HAHAHA!!!"); return(View()); } } else { ModelState.AddModelError("ProviderId", "There is no Service Provider that exists with the selected ID..." + "I'm begging you, think very carefully and give this just one more shot, Big Guy"); return(View()); } } else { ModelState.AddModelError("CustomerName", "Your selected CustomerID and CustomerName do not match with our database. Try once more."); return(View()); } } else { ModelState.AddModelError("CustomerId", "There is no customer that exists with that ID... Please try.. maybe... one more time?"); return(View()); } } else { ModelState.AddModelError("AppTime", "The selected Service Provider is not available for an appointment at this time. Please try again."); return(View()); } }