MVP and Entity Framework

May 22, 2008 at 11:10 AM
Is there any architecture guidance out there for combining the new MS Entity Framework with the MV pattern? Specifically around:

1) Where should the conceptual models be stored? In separate class libraries? Registered as a service? Along with my existing Business Entities?

2) How many conceptual models should I have? Many of my Business Models need to reference the same entity classes. I dont want multiple conceptual models defining the same mappings for the same entity/table, yet these entities must be accessible from multiple Business Entities. Yet if I only have one conceptual model, then many classes will have to be recompiled if the model changes only slightly

3) In my "view" pages, would I still use the ObjectDataStore? Would I then bind the ObjectDataStore.DataSource to a List<> populated by the controller, or directly bind it to an Entity Context from the Entity Framework?

Any help appreciated!