Linq 联合查询
来源:互联网 发布:php开发服务器端 编辑:程序博客网 时间:2024/06/05 00:45
query = from bp in query
join sm in _storeMappingRepository.Table
on new { c1 = bp.Id, c2 = "BlogPost" } equals new { c1 = sm.EntityId, c2 = sm.EntityName } into bp_sm
from sm in bp_sm.DefaultIfEmpty()
where !bp.LimitedToStores || storeId == sm.StoreId
join sm in _storeMappingRepository.Table
on new { c1 = bp.Id, c2 = "BlogPost" } equals new { c1 = sm.EntityId, c2 = sm.EntityName } into bp_sm
from sm in bp_sm.DefaultIfEmpty()
where !bp.LimitedToStores || storeId == sm.StoreId
select bp;
query = from bp in query
group bp by bp.Id
into bpGroup
orderby bpGroup.Key
select bpGroup.FirstOrDefault();
阅读全文
0 0
- linq嵌套、联合查询
- Linq联合查询
- Linq 联合查询
- LINQ To DataSet:联合查询
- LINQ基础之联合查询
- LINQ,EF联合查询join
- LinQ数据查询,联合查询 委托扩展
- linq To SQl之多表联合查询
- vb.net Linq四表联合查询
- Linq To Entity 多表联合查询
- Linq 联合查询条件快捷拼接方法
- NHibernate Linq 的 join (联合查询) 的例子
- 联合查询
- 联合查询
- 联合查询
- 联合查询
- 联合查询
- 联合查询
- 数据库性能优化之SQL语句优化
- 传统软件测试流程和分类
- CUDA编程(十)使用Kahan's Summation Formula提高精度
- Selenium2library关键字之富文本框和上传文件
- 查看memcached\redis\pdo_mysql\phpinfo是否正确配置
- Linq 联合查询
- 浅谈浏览器http的缓存机制
- 剑指offer中一些有关数组和字符串操作的代码实现和扩充
- UMG 常用方法
- 【动态规划】UVa 437 The Tower of Babylon
- 37-两个链表的第一个公共结点
- android 中处理崩溃异常
- 栈与堆栈
- Mabatis报错 java.sql.SQLException: Parameter number 3 is not an OUT parameter 解决方法