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
TodoModel
can not be mutated - Commands derive from
ImmutabilityCommand<TodoModel>
- The commands
Execute
methods have an out parameter of typeTodoModel
- Methods of the
TodoModel
return a new instance ofTodoModel
and play well with the commands - The
Engine
is configured to support immutability = Immutable kernel, no locking and no result serialization
OrigoDB Project page: http://devrexlabs.gitub.io/