Linq question

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?
 
S

Scott M.

Can you be more specific? What do you mean by "join together a table out of
a database"?
 
K

kfparri

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top