public async Task <IActionResult> GetEstudiante(long Id) { var estudiante = await _estudianteService.GetEstudiante(Id); var estudianteDTO = _mapper.Map <EstudianteDTO>(estudiante); var response = new APIResponse <EstudianteDTO>(estudianteDTO); return(Ok(response)); }
public ActionResult <Estudiante> GetEstudiante(int id) { try { return(Ok(estudianteService.GetEstudiante(id))); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message)); } }