public DomainStoreEntity(IIntegrationEvent integrationEvent) : this() { TypeName = integrationEvent.GetType().AssemblyQualifiedName; PartitionKey = EntityPartitionKey; RowKey = GetRowKey(integrationEvent.Created); IsCompressed = true; var json = JsonConvert.SerializeObject(integrationEvent, TableStorageJsonSerializerSettings.GetDefault()); Data = IsCompressed ? json.Zip() : json; }
public TransactionStoreDataEntity(string transactionId, IEvent @event) : this() { PartitionKey = transactionId; RowKey = GetRowKey(@event.Created); TypeName = @event.GetType().AssemblyQualifiedName; IsCompressed = true; IsPublished = false; var json = JsonConvert.SerializeObject(@event, TableStorageJsonSerializerSettings.GetDefault()); Data = IsCompressed ? json.Zip() : json; }