[Route("api/v1/patients/hospital")] // Patients in hospital public ActionResult <IEnumerable <PatientView> > GetAllPatients([FromQuery] int hospital_Id) { var patientItem = _repository.GetAll(hospital_Id); if (patientItem != null) { return(Ok(patientItem)); } return(NotFound()); }