public void Handle(ICommandContext context, RegisterUser command) { var user = new UserRegisterService(_uniqueService, context.CommandId) .Register(command.LoginId, command.Password, command.UserName, command.Email); context.Add(user); //Console.WriteLine("添加一个用户"); }
public UserRegViewModel(PageService pageservice, UserRegisterService registerService, EventBus eventBus, Validator validator) : base(pageservice) { this.registerService = registerService; this.eventBus = eventBus; this.validator = validator; Init(); }
public UserController( UserLoginService loginService, UserRegisterService registerService, TokenAuthService tokenAuthService, UserProfileService userProfileService) { _loginService = loginService; _registerService = registerService; _tokenAuthService = tokenAuthService; _userProfileService = userProfileService; }
public ProfileViewModel(PageService pageservice, Validator validator, UserService userService, UserRegisterService registerService, DeclarationService declarationService) : base(pageservice) { this.validator = validator; this.userService = userService; this.registerService = registerService; this.declarationService = declarationService; Init(); }
public ActionResult Register(RegisterForm RegisterForm) { if (!ModelState.IsValid) { // 入力チェックエラー return(View(RegisterForm)); } // 登録実施 UserRegisterService service = new UserRegisterService(); service.RegisterUser(RegisterForm); return(View("RegisterComplete")); }