随笔分类 -  Linq

摘要:在读取的数据集进行跳跃查询,关键方法Skip().Take(); Skip跳过序列中指定的元素 Take从序列的开头返回指定数量的连续元素 var select = from n in entities.lib_reportinfo join e in entities.lib_enterprise on n.Ep_Guid equals e.Guid into temp_ne from tt in temp_ne.DefaultIfEmpty() select new { guid = n.Guid, epName = tt.Ep_Name, epTrade = tt.Ep_Trade, . 阅读全文
posted @ 2012-12-12 13:42 ajunfly 阅读(2941) 评论(0) 推荐(0)
摘要:Linq查询语句编写工具可以用LinqPad,挺好用的一下是我自己学习Linq to SQL的查询语句//基本查询/*from c in WorkFlowsselect c*///带条件查询/*from c in WorkFlows where c.Pid==1select c*///查询显示不同的列/*from c in WorkFlows select new{ c.ID, c.WorkFlowName}*///排序/*from c in WorkFlowsorderby c.ID descendingselect c*///去除某个字段的重复/*(from c in WorkFlowsw 阅读全文
posted @ 2011-11-10 15:47 ajunfly 阅读(9906) 评论(0) 推荐(1)