Demonstrating an immutable model using the new immutable collections from Microsoft available on nuget as Microsoft.Bcl.Immutable
Uses NET Framework 4.5 (required by Microsoft.Bcl.Immutable) and OrigoDB.Core 0.11.1 (prerelease) A single project solution with a console application demonstrating use of the model.
Things to notice:
- An instance of
TodoModelcan not be mutated - Commands derive from
ImmutabilityCommand<TodoModel> - The commands
Executemethods have an out parameter of typeTodoModel - Methods of the
TodoModelreturn a new instance ofTodoModeland play well with the commands - The
Engineis configured to support immutability = Immutable kernel, no locking and no result serialization
OrigoDB Project page: http://devrexlabs.gitub.io/