Пример #1
0
        public async Task <ActionResult> Create(User user)
        {
            if (ModelState.IsValid)
            {
                UsersClient api = new UsersClient();

                user.Password = Utilities.SHA256Encrypt(user.Password);

                await api.AddAsync(user);

                return(RedirectToAction("Index"));
            }

            ViewBag.UserTypeID = LoadUserTypes();
            return(View(user));
        }