Esempio n. 1
0
        public async Task <OperationResult> UpdateFriends(Guid userId, IEnumerable <Guid> friendIds)
        {
            var entity = new DynamicTableEntity(UserEntity.FormatPartitionKey(userId), UserEntity.FormatRowKey())
            {
                ETag = "*"
            };

            entity.Properties.Add(nameof(UserEntity.FriendsJson), new EntityProperty(UserEntity.FormatFriendsJson(friendIds)));
            await db.UserTable.ExecuteAsync(TableOperation.Merge(entity));

            return(OperationResult.Success);
        }