public IActionResult Get()
 {
     return(Ok(_hospitalRepository.GetAll()));
 }
Exemple #2
0
        // GET: Hospitais
        public ActionResult Index()
        {
            var hospitalViewModel = Mapper.Map <IEnumerable <Hospital>, IEnumerable <HospitalViewModel> >(_hospitalRepository.GetAll());

            return(View(hospitalViewModel));
        }