Ejemplo n.º 1
0
        //public IEnumerable<Hospital> GetAllHospital() => hospitalRepository.GetAllHospital();
        public ActionResult GetAllHospital()
        {
            List <HospitalDto> hospitals = new List <HospitalDto>();

            hospitals = hospitalRepository.GetAllHospital();
            if (hospitals.Count == 0)
            {
                return(NotFound());
            }
            return(Ok(hospitals));
        }