public IActionResult GetAllByProfessor(int idProfessor) { try { return(Ok(appService.ConsultarPorProfessor(idProfessor))); } catch (Exception e) { return(StatusCode(500, e.Message)); } }