how to select all the columns from both query ( Join case) , see the example below :
var particiapants = from p in data.getAllParticipant() from l in dt.GetAll() where p.IdParticipant == l.IdParticipant select p , l ; ??? I want to display all the columns , and i dont want to do :
p.name , p.job .........7 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pooja DixitPosted Jun 6, 2017, 8:48 AM
pankaj raiPosted Oct 17, 2016, 2:25 AM
Ankur GoelPosted Sep 20, 2016, 4:43 AM
Final Output: new {e, e1}Shuvo SarkerPosted Sep 19, 2016, 3:46 AM
Bikesh SrivastavaPosted Sep 8, 2016, 2:53 AM
Tapan PatelPosted Sep 7, 2016, 5:21 PM
Ali HaiderPosted Sep 4, 2016, 9:09 AM
oining on multiple columns in Linq to SQL is a little different.
You have to take advantage of anonymous types and compose a type for the multiple columns you wish to compare against.
This seems confusing at first but once you get acquainted with the way the SQL is composed from the expressions it will make a lot more sense, under the covers this will generate the type of join you are looking for.
EDIT Adding example for second join based on comment.