Esempio n. 1
0
        // GET: PostoSaude
        public async Task <ActionResult> Index()
        {
            var entity = await _postoSaudeService.GetAllAsync();

            if (entity == null)
            {
                return(NotFound());
            }

            var model = Mapper.Map <List <PostoSaudeGetOutViewModel> >(entity);

            return(View(model));
        }
Esempio n. 2
0
        public async Task <ActionResult <List <PostoSaudeGetOutViewModel> > > Get()
        {
            var item = await _postoSaudeService.GetAllAsync();

            if (item == null)
            {
                return(NotFound());
            }

            var result = Mapper.Map <List <PostoSaudeGetOutViewModel> >(item);

            return(result);
        }