Linq Query - Multiple Table Selection
Posted on 2012-03-15
Hello. Let's say we have the tables below:
ID PROJECTID MEMBERID DATEOFSIGNOFF
111 1 11 1/5/2012
222 1 22 1/6/2012
333 2 44 1/9/2012
Each project will have 2 members and each member will sign off on the project. I need a Linq query that will select a project and also the two project members that have signed off on the project (if any).
The required dataset for this example is below:
PROJID PROJNAME MEMBERID1 DATE1SIGNOFF MEMBERID2 DATE2SIGNOFF
1 Roadwork 11 1/5/2012 22 1/6/2012
This dataset will be sent to a dataGrid for display. At this point, I'm not certain how to select multiple rows from the PROJECTMEMBERS table. A full query would be appreciated.
Environment: C#.NET 4.0