我想要进行一个涉及两个表格的请求。
页面表格: Id,LangId(主键) PageTypeId,PageTypeLangId(外键)
页面类型表格: Id,LangId(主键)
那么怎么做呢?在这里,我只需要添加PageTypeLangId。
return context.Pages
.Join(context.PageTypes, p => p.PageTypeId, pT => pT.Id,(p, pT) => new { p, pT })
i would like :
select * from Page inner join PageType on Page.PageTypeId=PageType.Id and Page.PageTypeLangId=PageType.LangId
感谢您的帮助!
select * from Page inner join PageType on Page.PageTypeId=PageType.Id and Page.PageTypeLangId=PageType.LangId
... - Olivier Albertini