.NET ORMs, immutable value objects, structs, default constructors, and readonly properties
问题 I am just getting started with .NET ORMs, to the point where I haven't even decided between Entity Framework and NHibernate. But in both cases, I'm running into a problem in that they seem to want me to compromise the integrity of my domain model in various ways, especially on finer points of C# object design. This is one of several questions on the subject. I am very used to enforcing immutability on appropriate properties with a pattern that looks like this: public class Foo { private