public async Task <IActionResult> BuscarModulos() { try { var modulos = await _moduloRepository.ObterTodos(); return(Response(modulos)); } catch (Exception ex) { return(ResponseErro(ex)); } }
public IEnumerable <ModuloViewModel> ObterTodos() { return(Mapper.Map <IEnumerable <ModuloViewModel> >(_moduloRepository.ObterTodos())); }