Discovered a cool feature in EF5. You can create multiple Edmx models in one .NET project. You can now create multiple domains with separate domain models within the same assembly. Up to now, I had one large Edmx file with all the required db objects for all my repositories and also only in one color. I am no longer forced to create multiple domain assemblies.
Here an example for my business domain:
And another domain for my diagnostics…
With this I can separate domains as I wish. For example, configuration data could be loaded per application lifecycle, or business entities can be load per web request…
If I mix this with the repository pattern, use an IoC, I have the basis for a solid backend tier of an application which can remain readable with large database schemas.
here’s source code of a simple hello world example:
git@github.com:damienbod/EF5DomainTest.git
Do you mind if I quote a couple of your posts as long as I provide
credit and sources back to your webpage? My blog site
is in the exact same niche as yours and my visitors would definitely benefit
from a lot of the information you present here.
Please let me know if this ok with you. Many thanks!
No Problem