LinQ中合并、连接、相交、与非查询
2024-09-01 09:17:52
LinQ中Union合并查询:连接不同的集合,自动过滤相同项;延迟。即是将两个集合进行合并操作,过滤相同的项
var cities = (from p in mylinq.System_Places where p.PID == place select p).Union( from q in mylinq.System_Places where q.Parentid==place select q );
LinQ中的Concat连接查询:连接不同的集合,不会自动过滤相同项;延迟。
(from p in System_Places where p.PID == 1010 select p).Concat( from q in System_Places where q.Parentid==1010 select q ).Concat( from n in System_Places where n.Parentid==1010 select n )
LinQ中的Intersect相交查询:获取不同集合的相同项(交集),即两集合都出现的项。
(from c in Bst_System_Places select c.CnPlaceName).Intersect( from e in Bst_Company_Jobs select e.WorkPlace)
LinQ中的Except与非查询:排除相交项,即从某集合中排除与另一集合中相同的项,以前集合为主。。。
(from e in Bst_Company_Jobs select e.WorkPlace).Except( from c in Bst_System_Places select c.CnPlaceName)
最新文章
- 闲来无聊,研究一下Web服务器 的源程序
- TextView字体阴影效果
- delphi安装 Tclientsocket, Tserversocket控件
- there is no spatial analyst license available or enabled
- Quality trimming using Trimmomatic
- [Python爬虫] Selenium获取百度百科旅游景点的InfoBox消息盒
- POJ 1012 Joseph
- 基于selenium的pyse自动化测试框架
- AxWebBrowser与WebBrowserU盾登陆时的使用
- 利用FSO取得BMP,JPG,PNG,GIF文件信息(大小,宽、高等)
- ThreadLocal实现方式&;使用介绍---无锁化线程封闭
- js 弹出页面传值
- Apache RewriteCond RewriteRule 入门和Laravel去掉index.php
- 设置session超时
- angular.js跨域post解决方案
- ubuntu16.04 英文环境安装google chrome
- php 类接口继承练习
- splay详解(二)
- mysql - Truncated incorrect DOUBLE value: 'undefined'
- SpringBoot入门最详细教程
热门文章
- redis启动异常处理一例
- BZOJ1485: [HNOI2009]有趣的数列(卡特兰数+快速幂)
- 摘:J2EE开发环境搭建(1)——安装JDK、Tomcat、Eclipse
- docker学习3-镜像的基本使用
- 微信小程序~用户转发 onShareAppMessage
- 《CoderXiaoban团队》实验十 团队作业6:团队项目系统设计改进与详细设计
- java技术思维导图(转载)
- Python的可变类型和不可变类型?
- war包部署到服务器后,如何直接访问,而不需要在地址后面加war包名
- 了解一下Elasticsearch的基本概念