Reputation: 12475
i have 2 table (user, user_profile) without a explicit relationship in the sql db. and i can't add it to the db.
so, i can't do this:
db.user.include("user_profile")
the attribute in for the join is user_id
is possible do anything like this?
db.user.join("user_profile On user.id = user_profile.user_id")
How can i do that?
thanks
Upvotes: 0
Views: 1715
Reputation: 8357
Try this :
from u in db.user
join up in db.user_profile on u.id equals up.user_id
select new { u, up};
Upvotes: 5