开发者

How can i join Master-Detail-Detail Tables with Linq in Entity Framework

I have 3 table a,b and c

a.Id,a.code /master
b.Id.b.code,b.aId,c.Id /detai开发者_如何转开发l
c.Id,c.code / detail of detail

i will join this three table with linq and show it in grid. How can i do this?


var query = from recordA in context.TableA
            join recordB in context.TableB
            on recordA.Id equals recordB.aId
            join recordC in context.TableC
            on recordB.cId equals recordC.Id
            select new 
            {
               // whatever columns are appropriate
            };
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜