public DynamicTableEntity ConvertToDynamicEntity(SerializedClefLog log) { var properties = DistributeDataByProperties(log.Data); properties[VERSION] = EntityProperty.GeneratePropertyForInt(1); return(new DynamicTableEntity { Properties = properties }); }
public async Task Save(SerializedClefLog log) { if (log == null) throw new ArgumentNullException(nameof(log)); var batch = new TableBatchOperation(); var entity = m_tableEntityConverter.ConvertToDynamicEntity(log); entity.PartitionKey = m_keyGenerator.GeneratePartitionKey(log.LastEventTime); entity.RowKey = m_keyGenerator.GenerateRowKey(log.FirstEventTime); batch.Insert(entity); var table = await m_tableFactory.Create(log.LastEventTime); await table.ExecuteBatchAsync(batch); }