Esempio n. 1
0
        public async Task <ApplicationUser> CreateUser(string username, string password)
        {
            var hash = password; //todo: hash password;
            var user = new UserEntity();

            user.CreateUser(username, hash);

            user.SetAsUserNameRecord();
            await _tableClient.AddAsync <UserEntity>(user);

            user.SetAsUserIdRecord();
            await _tableClient.AddAsync <UserEntity>(user);

            return(user.ValidateUser(password));
        }