Esempio n. 1
0
        public JsonResult AddUserPost(ApplicationUserResource applicationUserResource)
        {
            if (ModelState.IsValid)
            {
                var user = new ApplicationUser
                {
                    UserName = applicationUserResource.Email,
                    Email    = applicationUserResource.Email,
                    Name     = applicationUserResource.Name,
                    Role     = applicationUserResource.Role,

                    PhoneNumber = applicationUserResource.PhoneNumber
                };



                return(Json(_applicationUserService.AddUser(user)));
            }
            return(Json("error"));
        }