Linq语句简单应用
摘要:
select p; q.Dump();//查询 var w= from p in Products where p.CateoryId==1 select new {p.ProductName,p.UnitPrice}; w.Dump();//按照是否供应分组,显示数量 var hh= from p in Products group p by p.IsAbord into g select new {g.Key,Nums=g.Count()};//按类别分组,显示数量 var ww= from p in Products group p by p.Category.CategoryName. 阅读全文
posted @ 2011-03-01 23:11 柠檬哥 阅读(258) 评论(0) 推荐(0) 编辑