Hi Matt,
I'm working at this stuff at the moment as well. What I found out is that it is very easy to select data from different tables when they are joined a a primary key. Main condition for this is that the relations are already defined in Your SQL-database. If so You can generate the dbml-file and select the master-detail records like this:
var query = from c in db.customers
from j in c.job_info
where j.status = 'A'
orderby c.company;
As You see You don't need to know about the Join condition! The trick is in line two! If You take a look at a selection of customer-records in the debugger, You will find an additional property containing a collection of records of Your job_info-table and all the other depending tables of Your customer record. That's pretty cool! I don't understand why all the demos, webcasts ... don't mention this cool things?!
Moreover I found out that it's pretty helpfull to use the external Tool LinqPad to develop all the LINQ-statements without compiling all the time. Another interesting tool is a new VS Addin called "Visual LINQ Query Builder" which is relatively new.
Hope this info is interesting for You.
best regards from here
Michael
_____________________________
Michael Niethammer
TMN-Systemberatung GmbH
Schwabstr. 7 74360 Ilsfeld
Germany
fon +49 70 62 / 95 65 20
fax +49 70 62 / 95 65 19
niethammer@tmn-systemberatung.de