Exemplo n.º 1
0
        public async Task <IBlogPictureInfoData> GetAsync(string blogId)
        {
            var partitionKey = BlogPictureInfoEntity.GeneratePartitionKey();
            var rowKey       = BlogPictureInfoEntity.GenerateRowKey(blogId);

            return(await _blogPictureInfoTableStorage.GetDataAsync(partitionKey, rowKey));
        }
Exemplo n.º 2
0
        public static BlogPictureInfoEntity Create(IBlogPictureInfoData src)
        {
            var result = new BlogPictureInfoEntity
            {
                PartitionKey = GeneratePartitionKey(),
                RowKey       = GenerateRowKey(src.BlogId),
                FileName     = src.FileName,
                ContentType  = src.ContentType,
                ImageUrl     = src.ImageUrl
            };

            return(result);
        }
Exemplo n.º 3
0
 public async Task SaveAsync(IBlogPictureInfoData fileInfoData)
 {
     var newEntity = BlogPictureInfoEntity.Create(fileInfoData);
     await _blogPictureInfoTableStorage.InsertOrReplaceAsync(newEntity);
 }