Пример #1
0
        public async Task <ActionResult> CrearUsuario(RegisterViewModel model)
        {
            if (ModelState.IsValid)
            {
                var user = new ApplicationUser {
                    UserName = model.Email, Email = model.Email
                };
                var result = await UserManager.CreateAsync(user, model.Password);

                var logica = new UsuarioLogica();
                logica.AgregarUsuario(logica.GetUsuario(user.Id));
            }

            return(RedirectToAction("Index"));
        }