Let's face it: Entity Framework suffers from a huge architectural problem: the business entities are tightly couple with Entity Framework.
Here a band-aid: Persistence Ignorance (POCO) Adapter for Entity Framework.
It uses an adapter layer that will translate between POCO objects and Entity Framework-aware objects and provide services on top of POCO objects, such as:
-
Change tracking (snapshot-based and proxy-based when possible)
-
Transparent lazy loading
-
Immutable Value Objects
-
Queries (LINQ and Entity SQL)
-
Shadow state (maintaining certain persistence-related fields outside of entity class)
It includes a library helper and a code generator which generates the adapter layer.
And here's Kowalsky's article about it.
No comments:
Post a Comment