Example #1
0
        // home/[email protected]&code=123
        public ActionResult VerifyUser(string email, string code)
        {
            var cmd = new UserVerifyingEmailCmd
            {
                EmailAddress     = email,
                VerificationCode = code
            };

            ServiceBus.Bus.Send(cmd);
            return(Json(new { sent = cmd }));
        }
 public void Handle(UserVerifyingEmailCmd message)
 {
     if (message.VerificationCode == this.Data.VerificationCode)
     {
         Bus.Send(new CreateNewUserWithVerifiedEmailCmd
         {
             EmailAddress = this.Data.EmailAddress,
             Name         = this.Data.Name
         });
         this.MarkAsComplete();
     }
 }