关系型数据之LinQ基本查询
如下图所示关系型数据,LinQ语句为:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAvEAAAGlCAMAAABEEVmvAAAAAXNSR0IArs4c6QAAAN5QTFRF1dHJ09PTmc0B5+XhQEBAAAAA8eeN///////hgYGBOJXl2//h/9t+Ojp+8xrz25E7OpHb/9uRZQBe2///MC5v1bNwuNHJt2YA//+hOjqRt//gZrf////bAGa3PAAAt/////+5AD2Jktv//7dljTg4kDsAAAU9l9HLbiEAGm2kJgBm+z081dOnrbRvVZXJt3MuWABJ1dGPMwA/drPHZbbhAC5vlVsBSWZW2dx9kdvh25EyttWOnKDPZT2DNWi+l6Kdtsaw6Ojy7aKfd5VuOTkydKUcMDB2+Cx805dUHgAV6VnjvwAAIABJREFUeNrtnQlD27jahd0p+hzKdBIGknQGSAmBhCUhhEDonTIFutzL//9Fn2R5kWxJlp0FL+e0bLZlK87jk9eyXslxHfrvPdW2s+3E5UJQxUSpdkA8VCPi4fEQPB7EQ/B4CILHQxA8HoLg8RAEj4cgeDwEweMhCB4PQfB4CILHQxA8HoLHaz1+y4GgyknyeOli2N6Cx0MV93hXvBYY8XAEqNoeD+KhGiCfIJ6AeKhOHk9APFQnjycgHqqTxxMQD8HjIQhxPARVw+PRVgPVzON9gXioLh4P4iF4PARV0OO3JW3F/oag8kvy+C0Iqrokj4egWnk8BNUrjoegerXVQFAttAXioTp5/LZA/DLZgxBUDgnEL8Etxj2Aykf8Mka9jc8GqF7E5zR5fDZABSD+2tc3T1mIf+Z6yvDZgHcAenviT05OHg98RcST8JuW+EcvVHnZznJ0CCqGx3/7FvN4gXgSKEn8y97eyb8gHioT8Y/eEKyu+0y/HvcF4EPMiRN9ycS/c5yTRyXxJPELiIeKQ/wz/3p5/CkAn+7xo+fHp6enfxOsR//lkiAeKgDxT+/8W9DH56eIeCJGNVqPZzpxTkaj93HkiVQCxEMFIj6IaF5e9p5+OvGwxuTx719eXk5OvGjovTKqgcdDBY5q6F1oRDzRx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c5TcqAE6qw68iZ7GYiTndkTb9db2I54ZP3B4wPi27cjM/HipH5WyRrxOUJCjyfZPN4uI8SSeGT9weP9HKiUOF6e1C8r8VJqK3HfkHhk/cHjl8nszuPxxH1T4pH1B49fYvQOqzhebqshme9creJ4irsd8cj6g8cvMUKTXVtN1EiTK463aqs5vjkZ9K2IR9YfPJ63x1+ktce3FDDbtMcTEm+Pd93Vt8cPyPDEtSEeWX/w+LU/cxWidzxzhYoSx68v6y8M3XN6PIiHSubxeS9PEA+tweOR9Qfia+XxyPoD8fXyeGT9IeuvZnG8SfB4eDzaakA8iEdbDYgH8fB49cxnrusKT6CM3Q1APLROj19cpBDfVfUycMXMKC3x4Vw48vjxUqfK5KPYjFl/A1pY2bMGWX/weAXx7V4K8bs9BfGHZ+QylXgSDKsa/qEgXvo8kMvbZf15Q9krO5Mh6w8enyR+fLplJv7w9CGvx0t9aYgY1QhZr4pkwEy9hfXXBLL+4PEK4l/7UzPxg6NmbuJFAyexrBASM3kF8VYZIfopQpD1B49PEj+7GZmJp2DnJl5y9fg8UEQy+eWIH6gDeWT9weOTGSEXjpl4StwyxEtNNmIAE5vpclmPVzo9sv7g8XHix+cp80DRO1TlPFCZPV4atibxi5r4DHG8BfHI+oPHa9NcYzMYL+vxbszj3eSwHku21Ryfp0c1yPqDx2+AeDGQFy4BeaJXXRxv3x4/fLLweGT9weM3kfUX+ruIOok3VKqJNwnPXKGcHr9W4sXnqcmHq0TYzgXxUPk9Pm9l7Yi3EIiHx1co6w/EQ1k8vvxZfyAesvZ4CKq4Yh4PQdVHPiR+G4KqLtHjtyCo8pI8HoJq1VbzfxBUeYkej7MBJbTtVqya8HioXsT/Px6StdXI5/WvAAAAAElFTkSuQmCC" alt="" width="650" height="309" />
var Query= from a in data.A
where a.admin==传入的用户名&&a.pwd==传入的密码(可以传入一个model实体)
join b in data.B
on a.bid equals b.id into ab
from r1 in ab.DefaultIfEmpty()
join c in data.C
on r1.cid equals c.id into bc
from r2 in bc.DefaultIfEmpty()
join d in data.D
on r2.did equals d.id into cd
from r3 in cd.DefaultIfEmpty() select new
{ //这里是table A 的id;
Id = a.Id, //这里是table B的Name;
Name = r1.Name,
Pro = r2.Pro,
IpAdd = r3.IpAdd
}; //转成数组形式; var list = Query.ToList(); //list[0].Name即表示整个LinQ查询的结果的第一条数据的table B的Name,以此类推;
注: r1可以.出table B的所有数据...以此类推;
r2==table C;
r3==table D;
=====================================================================================================
、左连接: var LeftJoin = from emp in ListOfEmployees
join dept in ListOfDepartment
on emp.DeptID equals dept.ID into JoinedEmpDept
from dept in JoinedEmpDept.DefaultIfEmpty()
select new
{
EmployeeName = emp.Name,
DepartmentName = dept != null ? dept.Name : null
}; 、右连接:
var RightJoin = from dept in ListOfDepartment
join employee in ListOfEmployees
on dept.ID equals employee.DeptID into joinDeptEmp
from employee in joinDeptEmp.DefaultIfEmpty()
select new
{
EmployeeName = employee != null ? employee.Name : null,
DepartmentName = dept.Name
}; 29 、内连接: var query = from t in entitiy.TB_GCGL_ADA_USER
join p in entitiy.TB_GCGL_ZY_ZYK
on t.ETPRS_CODE equals p.ETPRS_CODE select new TB_USER_ZYK
{
USER_ID = t.USER_ID,
USER_NAME = t.USER_NAME,
USER_PASSWORD = t.USER_PASSWORD, };
关系型数据之LinQ基本查询的更多相关文章
- SqlProfilter监控指定数据库数据表——监控linq组合查询生成的sql
1.例子 实际测试环境中往往很多测试都在调用数据库,那么如何使用SqlProfilter监控筛选到自己想要监看的数据库对应的表有关linq生成的sql时候就需要做如下设置了 ........... u ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(81)-数据筛选(万能查询)
系列目录 前言 听标题的名字似乎是一个非常牛X复杂的功能,但是实际上它确实是非常复杂的,我们本节将演示如何实现对数据,进行组合查询(数据筛选) 我们都知道Excel中是如何筛选数据的.就像下面一样 他 ...
- [C#] 进阶 - LINQ 标准查询操作概述
LINQ 标准查询操作概述 序 “标准查询运算符”是组成语言集成查询 (LINQ) 模式的方法.大多数这些方法都在序列上运行,其中的序列是一个对象,其类型实现了IEnumerable<T> ...
- Code First开发系列之管理数据库创建,填充种子数据以及LINQ操作详解
返回<8天掌握EF的Code First开发>总目录 本篇目录 管理数据库创建 管理数据库连接 管理数据库初始化 填充种子数据 LINQ to Entities详解 什么是LINQ to ...
- IEnumerable和IQueryable和Linq的查询
IEnumerable和IEnumerable 1.IEnumerable查询必须在本地执行.并且执行查询前我们必须把所有的数据加载到本地.而且更多的时候.加载的数据有大量的数据是我们不需要的无效数据 ...
- .NET LINQ基本查询操作
获取数据源 在 LINQ 查询中,第一步是指定数据源.像在大多数编程语言中一样,在 C# 中,必须先声明变量,才能使用它.在 LINQ 查询中,最先使用 from 子句的目的是引入数据源 ( ...
- 8天掌握EF的Code First开发系列之3 管理数据库创建,填充种子数据以及LINQ操作详解
本文出自8天掌握EF的Code First开发系列,经过自己的实践整理出来. 本篇目录 管理数据库创建 管理数据库连接 管理数据库初始化 填充种子数据 LINQ to Entities详解 什么是LI ...
- Linq动态查询简易解决之道(原创)
因为项目需要使用Linq来查询数据,但是在多条件查询时,需要使用一大堆if(...!=string.empty)等判断条件感觉不是很优雅.网上搜索以下,大概找到了两种办法,一种是老外写的一个类,感觉用 ...
- Linq 中查询一个表中指定的字段
//Linq中查询一个表中指定的几个字段: ); // FindAllItems()为查询对应表的所有数据的方法: // Where 里面为查询条件 // Select 为查询的筛选条件 new{} ...
随机推荐
- C#基础总结
1.执行.NET应用程序时经历的几个步骤 用C#编写应用程序代码 把应用程序代码编译为中间语言代码(MSIL),存储在程序集中 使用JIT编译器将MSIL编译为本机代码 在托管的公共语言运行库(CLR ...
- javascript温故知新
1 javascript作用域 初学javascript的时候,变量的作用域就感觉有些麻烦,他不像C#或java那样清晰明了,貌似处处都在作用域内,但有时会处处都是空. javascript中,变量的 ...
- IOS开发之画图形
1 画线 2 画线第二个方法 相对方法1简洁 3 矩形 4 圆 5 弧线 6画文字(略) 7 画图片(略)
- 1千万英国用户被Cryptolocker勒索软件瞄准
英国国家打击犯罪调查局(NCA)发布国家紧急警报,警报一场大规模的垃圾邮件,这些邮件中包含了一款名为CryptoLocker的勒索程序,把目标瞄准了1千万英国的email用户,该程序会加密用户的文档, ...
- python网络编程【三】(网络服务器)
建立一个服务器需要以下4步: 1.建立socket对象. 2.设置socket选项(可选的) 3.绑定到一个端口(同样,也可以是一个指定的网卡). 4.侦听连接. 下面代码片段可以实现这些功能: ho ...
- Bootstrap<基础一> CSS 概览
HTML 5 文档类型(Doctype) Bootstrap 使用了一些 HTML5 元素和 CSS 属性.为了让这些正常工作,您需要使用 HTML5 文档类型(Doctype). 因此,请在使用 B ...
- onethink导出excel
function customer_daochu() { /** * 客户名单导出 * */ $customer = D('WcoaUCustomers'); $data = $customer-&g ...
- AWS-CDH5.5安装 CM配置节点
在CM节点上进行安装时出现错误: ================================================================================ Pa ...
- cheap gucci bags for women finish fashion jewellery has to move
Is certainly his dresser seem or dress creation process into video clip. Bus dropped???? Especially ...
- gnome3.X添加开机启动项
背景:升级gnome后发现gnome-session-properties不见了,想把sslocal随机启动遇到了麻烦... 特别说明:此为图形桌面开机启动项,因此只有通过图形桌面登陆用户后才能启动. ...