public async Task <IActionResult> Delete(int medicoConsultaId)
        {
            try
            {
                var funcionario = await _medCons.GetMedicoConsultaAsyncById(medicoConsultaId);

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

                _medCons.delete(funcionario);

                if (await _medCons.SaveChangesAsync())
                {
                    return(Ok());
                }
            }
            catch (System.Exception)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Falha no Banco de dados"));
            }

            return(BadRequest());
        }
        public async Task <IActionResult> Delete(int pacienteId)
        {
            try
            {
                var paciente = await _pac.GetPacienteAsyncById(pacienteId);

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

                _pac.delete(paciente);

                if (await _pac.SaveChangesAsync())
                {
                    return(Ok());
                }
            }
            catch (System.Exception)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Falha no Banco de dados"));
            }

            return(BadRequest());
        }