Exemplo n.º 1
0
        public async Task <IBlogData> GetAsync(string id)
        {
            var partitionKey = BlogEntity.GeneratePartitionKey();
            var rowKey       = BlogEntity.GenerateRowKey(id);

            return(await _blogsTableStorage.GetDataAsync(partitionKey, rowKey));
        }
Exemplo n.º 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;
            }));
        }
Exemplo n.º 3
0
        public async Task <IEnumerable <IBlogData> > GetBlogsAsync()
        {
            var partitionKey = BlogEntity.GeneratePartitionKey();

            return(await _blogsTableStorage.GetDataAsync(partitionKey));
        }