Esempio n. 1
0
        public async Task <UserInfo> Post([FromBody] UserInfo value)
        {
            var user = new ApplicationUser()
            {
                UserName = value.UserName + "_" + value.CompanyID, Email = value.userLogin.Email + "_" + value.CompanyID
            };
            IdentityResult result = await UserManager.CreateAsync(user, value.userLogin.Password);

            //user = await UserManager.FindByNameAsync(value.UserName);
            if (result.Succeeded)
            {
                return(UserInfoManager.AddItem(value));
            }

            return(value);
        }