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();
}
}

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

上一篇:C# 向批处理文件输入字符


下一篇:windows服务开发测试代码