querying databases on same server with linq
- by geoff swartz
In normal sql I could do joins on tables in different databases as long as they were on the same server (or linked servers). In linq I can't figure out how to do that. Is this possible? For example, if I have a database called db1 and another called db2. db1 has a table called people and db2 has a table called address I could do something like...
select a.addressline1, p.firstname
from db1.dbo.people p
inner join db2.dbo.address a on p.peopleid = a.peopleid
Is this possible with linq? Thanks.