public IEnumerable <PacienteResponse> Recuperar(FiltroPacienteRequest request) { request = request ?? new FiltroPacienteRequest(); var reponse = pacienteRepositorio.Recuperar(request.Codigo, request.Nome, request.DataNascimento); return(mapper.Map <IEnumerable <Paciente>, IEnumerable <PacienteResponse> >(reponse)); }
public IActionResult RecuperarFiltrado([FromQuery] FiltroPacienteRequest request) { var response = pacienteServico.Recuperar(request); if (response == null) { return(NotFound()); } return(Ok(response)); }