Creating a LINQ select from multiple tables

前端 未结 5 575
孤街浪徒
孤街浪徒 2020-12-02 09:11

This query works great:

var pageObject = (from op in db.ObjectPermissions
                  join pg in db.Pages on op.ObjectPermissionName equals page.PageNa         


        
5条回答
  •  情话喂你
    2020-12-02 09:49

    You must create a new anonymous type:

     select new { op, pg }
    

    Refer to the official guide.

提交回复
热议问题