public ActionResult Register(RegisterModel model) { if (ModelState.IsValid) { var regId = RegistrationIdGenerator.NewRegistrationId(); var data = new RegistrationData(model.UserName, model.Email, model.DisplayName, model.Password, Now.UtcTime); var cmd = new StartRegistration(regId, data); _commandSender.SendCommand(cmd); return View("RegistrationThankYou", regId); } return View(model); }
public StartRegistration(Guid registrationId, RegistrationData data) { RegistrationId = registrationId; Data = data; }