示例#1
0
        public async Task UpdateAsync(FileInfo fileInfo)
        {
            var entity = new FileInfoEntity(GetPartitionKey(fileInfo.MerchantId), fileInfo.Id);

            Mapper.Map(fileInfo, entity);

            await _storage.ReplaceAsync(entity);
        }
示例#2
0
        public async Task <string> InsertAsync(FileInfo fileInfo)
        {
            var entity = new FileInfoEntity(GetPartitionKey(fileInfo.MerchantId), GetRowKey());

            Mapper.Map(fileInfo, entity);

            await _storage.InsertAsync(entity);

            return(entity.RowKey);
        }
示例#3
0
        public async Task <FileInfo> GetAsync(string merchantId, string fileId)
        {
            FileInfoEntity entity = await _storage.GetDataAsync(GetPartitionKey(merchantId), fileId);

            return(Mapper.Map <FileInfo>(entity));
        }