public ActionResult Create(DigitalAccountCreateModel form)
        {
            //if (!ReCaptcha.Validate(ConfigurationManager.AppSettings["ReCaptchaPrivateKey"]))
            //{
            //    ModelState.AddModelError("Catpcha", "The verification words are incorrect.");
            //}

            form.UserId = AuthenticationService.GetUser().Id;
            //form.Password = form.Password;
            DigitalAccount digitalaccount = null;
            if (ModelState.IsValid)
            {
                try
                {
                    digitalaccount = new DigitalAccountCreateHandler().Handle(form);
                }
                catch (ValidationException e)
                {
                    ModelState.AddModelError(e.Key, e.Message);
                }
            }

            if (!ModelState.IsValid)
                return this.View();

            return RedirectToAction("Index");
        }
 public DigitalAccount Handle(DigitalAccountCreateModel form)
 {
     var owner = DigitalAccount.CreateDigitalAccount(form.UserId, form.WebSite, form.Username, form.Password, System.DateTime.Now, 1);
     Save(owner);
     return owner;
 }