New Posts New Posts RSS Feed: Multiple Models across Multiple Assemblies
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Multiple Models across Multiple Assemblies

 Post Reply Post Reply
Author
jozza View Drop Down
Newbie
Newbie


Joined: 11-Jul-2007
Posts: 25
Post Options Post Options   Quote jozza Quote  Post ReplyReply Direct Link To This Post Topic: Multiple Models across Multiple Assemblies
    Posted: 20-Jul-2010 at 5:40pm
Hi
We are thinking of architecting a modularized solution for the new version of our product. What we would like to do is implement a "Core" data model that contains the data required to run the core of our product. Clients can then purchase additional modules, and each module has it's own specific data model and should be able to interact with the data model in the core. How would one go about this using devforce? Is it even possible?
 
So in short we have two assemblies:
 
Data.Core >> Contains for example the personnel records.
Data.Attendance >> Contains a bunch of other entities some of which need a reference to personnel.
 
 
I've tried creating a linked file to get the Core Model into the "Attendance" assembly and then trying to set the Entity Manager name to the same in both edmx files, but it still generates constructors in both assemblies for the Entity Manager and the one in core only has the core tables (which you would expect) but the enity manager in the attendance assembly only has the tables for attendance and not the ones that are in the core.
 
Any advice is greatly appreciated. Thanks.
 
Jacob
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post Posted: 20-Jul-2010 at 7:52pm
We did design DevForce to work with multiple entity models, but a single EntityManager cannot work with multiple models that are in different assemblies.  Using multiple EntityManagers is not uncommon, but I'm not sure that would be a great solution since conceptually all your entities are sourced from the same database.
 
If each module is independent, then you could include the core model in all the assemblies and that would promote both code reuse and good integration between the entities.  If the modules overlap, there will be a little redundancy and you will have to make sure to import the correct entities when passing information between modules.

 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down