public void When(RegistrationCreated e)
 {
     m_writer.Add(e.Identity, new RegistrationView
     {
         Status = "Processing registration",
         Registration = e.Identity
     });
 }
示例#2
0
        public ActionResult Create(CreateAccountModel model)
        {
            if (ModelState.IsValid)
            {
                var securityid = new SecurityID(Guid.NewGuid().ToString());
                var security = new SecurityInfo(securityid, model.Username, model.Password, model.Username, null);
                var regid = new RegistrationID(Guid.NewGuid());

                var cmd = new RegistrationCreated(regid, DateTime.UtcNow, security);

                Bus.SendOne(cmd);

                return RedirectToAction("Index");
            }

            return View(model);
        }