how linq outdoor join subtable?
i have information tables form setup.
table a
aid aname
---------------------
1 a_name1
2 a_name2
3 a_name3
table b
bid bname
---------------------
10 b_name1
20 b_name2
30 b_name3
table c
aid bid
---------------------
1 10
2 10
2 20
2 30
3 20
3 30
i wish linq query given id give me list b list c.
so assist 1 i wish bid 20 & 30.
for assist 3 i wish bid 10
for assist 2 zero returned anything returned.
i know sql
select
b.bid
from b
left outdoor join c c.bid = b.bid a.aid = 1
-- assist change formed i looking for, 1, 2, 3
what linq equivalent?
please assume i have objects review tables a, b, c accordingly.
Comments
Post a Comment