Serialization

https://github.com/Elders/Cronus/issues/269

ISerializer interface is simple. You can plug your own implementation in but should not change it once you are in production.

The samples in this manual work with JSON and Proteus-protobuf serializers. very ICommand, IEvent, ValueObject or anything which is persisted is marked with a DataContractAttribute and the properties are marked with a DataMemberAttribute. Here is a quick sample how this works (just ignore the WCF or replace it with Cronus while reading). We use Guid for the name of the DataContract because it is unique.

Best Practices

Last updated

Was this helpful?