Linq question

  • Thread starter Thread starter kfparri
  • Start date Start date
K

kfparri

Hi,

I am trying to join together a table out of a database using Linq to
SQL with a list of class objects using a linq statement. I don't know
if this is possible, so could someone please help me?
 
Can you be more specific? What do you mean by "join together a table out of
a database"?
 
Can you be more specific?  What do you mean by "join together a table out of
a database"?







- Show quoted text -

This problem has been solved already. But I do have another
question. I am trying to get data from two seperate databases and
join them on a common field using Linq, but everytime i try to do this
I get an error about using data from a different context. I found some
information about using two linq queries and joining using the .ToList
function but I can't find any good examples.

Here is my code right now:

Dim q1 = From a In tbl1.Admins _
Select a

Dim q2 = From emps In ALL_EMPLOYEE _
Select emps

Dim q3 = From admin In q1, empinfo In q2 _
Where admin.IDNum.Contains(empinfo.IDNum) _
Select empinfo
 
Back
Top