public async Task <User> FindByNameAsync(String userName)
        {
            CloudTable table = await _cloudTableHelper.GetCloudTableByName(_configuration["UsersTable"]);

            TableStorageUser foundUser =
                await _cloudTableHelper.GetEntity <TableStorageUser>(table, _partitionKey, userName);

            if (foundUser == null)
            {
                return(default);
        public async Task <Boolean> CreateAsync(User user)
        {
            TableStorageUser userToStore = new TableStorageUser
            {
                HashedPassword = user.PasswordHash,
                PartitionKey   = _partitionKey,
                RowKey         = user.NormalizedUserName.ToUpper(),
                Timestamp      = DateTime.Now,
                UserName       = user.UserName,
            };

            CloudTable table = await _cloudTableHelper.GetCloudTableByName(_configuration["UsersTable"]);

            TableStorageUser savedUser = await _cloudTableHelper.InsertEntityAsync(table, userToStore);

            return(savedUser != null);
        }