//Id=User public ProfessorResponse Update(Guid Id, ProfessorUpdateRequest request) { ProfessorResponse professor = _professorDao.GetById(Id); if (!string.IsNullOrWhiteSpace(request.Department)) { professor.Department = request.Department; } if (!string.IsNullOrWhiteSpace(request.University)) { professor.University = request.University; } if (!string.IsNullOrWhiteSpace(request.Vocation)) { professor.Vocation = request.Vocation; } Guid ID = _professorDao.UpdateProfessor(Id, _mapper.Map <ProfessorUpdateRequest>(professor)); var response = new ProfessorResponse(_userService.UpdateUser(Id, request), ID, professor.University, professor.Department, professor.Vocation); return(response); }