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

            return(await _blogPictureInfoTableStorage.GetDataAsync(partitionKey, rowKey));
        }
Exemple #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);
        }
Exemple #3
0
 public async Task SaveAsync(IBlogPictureInfoData fileInfoData)
 {
     var newEntity = BlogPictureInfoEntity.Create(fileInfoData);
     await _blogPictureInfoTableStorage.InsertOrReplaceAsync(newEntity);
 }