public async Task <ActionResult <PostoSaudeGetOutViewModel> > Get(long id) { var item = await _postoSaudeService.GetByIdAsync(id); if (item == null) { return(NotFound()); } var result = Mapper.Map <PostoSaudeGetOutViewModel>(item); return(result); }
// GET: PostoSaude/Details/5 public async Task <ActionResult> Details(int id) { if (id == 0) { return(NotFound()); } var entity = await _postoSaudeService.GetByIdAsync(id); if (entity == null) { return(NotFound()); } var model = Mapper.Map <PostoSaudeGetOutViewModel>(entity); return(View(model)); }