views:

24

answers:

1

Hi, 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

+1  A: 

from u in db.user join up in db.user_profile on u.id equals up.user_id select new { u, up};

Frans Bouma