O'Reilly logo

Entity Framework 4.0 Recipes: A Problem-Solution Approach by Larry Tenny, Zeeshan Hirani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. Plain Old CLR Objects

Objects should not know how to save themselves, or load themselves, or filter themselves. That's a familiar mantra in software development and especially in Domain Driven Development. There is a good bit of wisdom in the mantra. Having persistence knowledge bound too tightly to our domain objects complicates testing, refactoring, and reuse. The classes generated by Entity Framework for our model entities are heavily dependent on the plumbing of Entity Framework. For some developers, these classes know too much about the persistence mechanism and are too closely tied to the concerns of models and mapping. There is another option.

The Entity Framework also supports using your own classes for the entities in the model. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required