//
        // POST REQUESTS
        public ActionResult RegisterUser(User_RegisterCommand cmd)
        {
            if (!ModelState.IsValid)
            {
                return RespondTo(request =>
                {
                    request[AcceptsFormatType.Html] = () => View("Step1", cmd);
                    request[AcceptsFormatType.Ajax] = () => PartialView("Step1", cmd);
                });
            }

            cmd.Id = Guid.NewGuid().ToString();

            Send(cmd);

            return RedirectToAction("Step2", new { userId = cmd.Id });
        }
Esempio n. 2
0
        //
        // POST REQUESTS

        public ActionResult RegisterUser(User_RegisterCommand cmd)
        {
            if (!ModelState.IsValid)
            {
                return(RespondTo(request =>
                {
                    request[AcceptsFormatType.Html] = () => View("Step1", cmd);
                    request[AcceptsFormatType.Ajax] = () => PartialView("Step1", cmd);
                }));
            }


            cmd.Id = Guid.NewGuid().ToString();

            Send(cmd);

            return(RedirectToAction("Step2", new { userId = cmd.Id }));
        }