Last post Jan 28, 2009 02:59 PM by ricka6
Jan 28, 2009 02:34 PM|jharwood|LINK
I am trying to have two dbml file in the same Dynamic Data Web site but I keep getting dulication errors. One of the tables is in both dbml files.
Basically what I am trying to do is have the user be able to go to a one page and see one set of tables and then go to a different page and see another set of tables but all the tables are accually from the same db. Is this possible?
Jan 28, 2009 02:56 PM|marcind|LINK
it is possible. Have a look at
Dynamic Data 4.0 Preview 2. It contains a project called SampleProject that illustrates this scenario. Basically you need to have two dbml models in your site and create MetaModel representations for them in Global.asax (you could either add each context
to a single MetaModel or have two MetaModels - the advantage of a single MetaModel is that you table list page will contain all tables). Then you will have to modify the routes to avoid any potential name conflicts.
Jan 28, 2009 02:59 PM|ricka6|LINK
ASP.NET Dynamic Data 4.0 Preview 2 - the SampleProject.
I don't think multiple DataContext support is available in the current version, but is in the futures. Update: This is supported in 3.5 SP1.