日期:2014-05-20  浏览次数:20768 次

谁帮忙把这条sql 转成linq啊
select * from T_News join T_NewsClass on t_news.ID_NewsClass = T_NewsClass.ID order by T_NewsClass.id desc


谢谢~~
QQ : 820791660

------解决方案--------------------
var query = from c in T_News 
join o in T_NewsClass on c.ID_NewsClass equals o.ID_NewsClass
orderby o.T_NewsClass descending 
select c; 

------解决方案--------------------
因为你的SQL语句是inner join
而你2楼的LINQ最终转化的是left join