EF-Linq
一丶基本语法
(from a in Table where a.id="001" select a).Tolist();
隐式内连接
from a in table1 join b in table2 on a.id equals b.id select new {
a.id,b.id
}
隐式外连接
from a in table1 from b in table2 where a.id==b.id select new {}
左外连接
from a in table1 join b in table2 on a.id equals b.id into xx from c in xx.DefaultIfEmpty()
select new {
}
group by into 分组
(from u in table1 group u by u.Sex into xx select xx).Tolist
|
作者:chenze 出处:https://www.cnblogs.com/chenze-Index/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 如果文中有什么错误,欢迎指出。以免更多的人被误导。 |

浙公网安备 33010602011771号