public UserGetResponseModel Get(int id) { var command = new UserGetCommand(id); var result = userApplicationService.Get(command); return(new UserGetResponseModel(result)); }
public UserGetResponseModel Get(string id) { var command = new UserGetCommand(id); var result = userApplicationService.Get(command); var userModel = new UserResponseModel(result.User); return(new UserGetResponseModel(userModel)); }
public UserGetResult Get(UserGetCommand command) { var id = new UserId(command.Id); var user = userRepository.Find(id); if (user == null) { throw new UserNotFoundException(id, "ユーザが見つかりませんでした。"); } var data = new UserData(user); return new UserGetResult(data); }
public UserGetResult Get(UserGetCommand command) { var id = new UserId(command.Id); var user = uow.UserRepository.Find(id); if (user == null) { throw new UserNotFoundException(id, "사용자를 찾지 못했음"); } var data = new UserData(user); return(new UserGetResult(data)); }
public CircleGetResponseModel Get(string id) { var getCircleCommand = new CircleGetCommand(id); var getCircleResult = circleApplicationService.Get(getCircleCommand); var circle = new CircleResponseModel(getCircleResult.Circle); if (circle.OwnerId == null) { return(new CircleGetResponseModel(circle, new UserResponseModel("", ""))); } var getOwnerCommand = new UserGetCommand(circle.OwnerId); var getOwnerResult = userApplicationService.Get(getOwnerCommand); var owner = new UserResponseModel(getOwnerResult.User); return(new CircleGetResponseModel(circle, owner)); }