Пример #1
0
        public async Task <IBlogData> GetAsync(string id)
        {
            var partitionKey = BlogEntity.GeneratePartitionKey();
            var rowKey       = BlogEntity.GenerateRowKey(id);

            return(await _blogsTableStorage.GetDataAsync(partitionKey, rowKey));
        }
Пример #2
0
        public Task UpdateAsync(IBlogData blogData)
        {
            var partitionKey = BlogEntity.GeneratePartitionKey();
            var rowKey       = BlogEntity.GenerateRowKey(blogData.Id);

            return(_blogsTableStorage.ReplaceAsync(partitionKey, rowKey, itm =>
            {
                itm.Update(blogData);
                return itm;
            }));
        }