public IActionResult UpdateStudent([FromBody] StudentViewModel studentView) { try { var idUser = User.GetUserId(); var studentId = _studentService.GetStudentIdForUser(idUser); var student = StudentMapper.ToActualObject(studentView); student.Id = studentId; _studentService.UpdateStudent(student); } catch (Exception e) { return(BadRequest(e.Message)); } return(Ok()); }