/// <summary> /// ユーザ登録 /// </summary> /// <param name="inputData"></param> public void Handle(UserCreateInputData inputData) { var username = inputData.UserName; var duplicateUser = userRepository.FindByUserName(username); if (duplicateUser != null) { throw new Exception("duplicated"); } var user = new src.Domain.Domain.Users.User(username); userRepository.Save(user); var outputData = new UserCreateOutputData(user.Id, DateTime.Now); presenter.Complete(outputData); }
/// <summary> /// ユーザ登録 /// </summary> /// <param name="inputData"></param> public void Handle(UserCreateInputData inputData) { throw new Exception(); }
public void CreateUser(string userName) { var inputData = new UserCreateInputData(userName); userCreateUseCase.Handle(inputData); }
/// <summary> /// ユーザ登録 /// </summary> /// <param name="inputData"></param> public void Handle(UserCreateInputData inputData) { var outputData = new UserCreateOutputData((id++).ToString(), DateTime.Now); presenter.Complete(outputData); }