public IActionResult update(int id, StudentDto m) { var student = m.ToStudent(); var updatedStudent = _service.UpdateStudent(id, student); if (updatedStudent == null) { return(BadRequest(new ErrorResponse { Message = $"Problem updating user {id}" })); } return(Ok(updatedStudent.ToDto())); }