0

Is there any way to create a linq2sql schema (*.dbml-file) in VS2012 with many object diagrams for different parts of the database. For instance one diagram for customer related tables and another diagram for product related tables.

The problem is, if I've a big database with many tables the object diagram looks overloaded.

2 Answers2

0

There is nothing keeping you from creating different dbml / DataContext objects that cover different sub-sets of your database but you cannot query or join across different DataContext objects.

If your goal is simply to create more manageable diagrams, I would suggest you do that at the SQL level using SSMS Diagrams. You will likely create more issues than solutions segregating your tables across different DataContext objects.

andleer
  • 22,388
  • 8
  • 62
  • 82
0

For sure it can be a royal PITA when you go beyond a handful of objects on the design surface, but there are a few of things you can do to make it a little easier.

  1. Keep the view zoomed out :)

  2. Use the "Layout Diagram" context menu item on the design surface to auto-arrange the layout. The designer does a pretty good job of making a clean layout when you do this, although I have not yet been able to figure out the apparently random order in which it lays out the tables.

  3. Also don't forget, when you are in the designer, the VS "Properties" tool window has a dropdown from which you can quickly select a table/object name that's on the design surface; once you get used to this in conjunction with point 2, it's pretty easy to navigate quickly around surfaces with many tables on them.

It's a shame though that they don't give the facility to even draw some boxes or tack some notes onto parts of the surface, it would really help with organisation...

Anyway, hope that helps somewhat...

Stephen Byrne
  • 7,400
  • 1
  • 31
  • 51