c# ado.net eftity framework 返回多表查询结果

public static IQueryable GetWeiXinTuWenList()
{
using (var Model = new Model.WeiXinEntities())
{
var List = (from C in Model.MP_WeiXinSuCaiCategory
join TW in Model.MP_WeiXinTuWen on C.Id equals TW.CategoryId into rt
from TW in rt.DefaultIfEmpty()
where C.WeiXinID == Common.WeiXinID
select new { TW.Id, CategoryName = C.Name, TW.Title }).ToList();
return List.AsQueryable();
}
}

你可能感兴趣的:(framework)