public async Task UpdateAsync(FileInfo fileInfo) { var entity = new FileInfoEntity(GetPartitionKey(fileInfo.MerchantId), fileInfo.Id); Mapper.Map(fileInfo, entity); await _storage.ReplaceAsync(entity); }
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); }
public async Task <FileInfo> GetAsync(string merchantId, string fileId) { FileInfoEntity entity = await _storage.GetDataAsync(GetPartitionKey(merchantId), fileId); return(Mapper.Map <FileInfo>(entity)); }