Exemple #1
0
        public async Task <IActionResult> ConsultasPorMedico(string nomeMedico)
        {
            try
            {
                if (string.IsNullOrEmpty(nomeMedico))
                {
                    return(View(RedirectToAction(nameof(Index))));
                }

                List <Consulta> listaConsultasPorMedico = await _consultaService.FiltraConsultasPorMedicoByNomeAsync(nomeMedico);

                return(View(listaConsultasPorMedico));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }