Value-Object pattern implementation in .NET


Regarding DDD patterns, here I link two nice Value-Object implementation samples:

http://elegantcode.com/2009/06/07/generic-value-object/

http://grabbagoft.blogspot.com/2007/06/generic-value-object-equality.html

Comments (1)

  1. Christian says:

    One problem in implementing true Immutable Value-Objects in .NET is serialization, even the one that Entity Framework has to perform. These mecanisms requiere a parameterless constructor, so the ture Immutability of the object is violated. Here is a post on how to resolve this problem christianarg.wordpress.com/…/c-net-immutable-properties-for-entity-framework-serializable-classes-etc

Skip to main content