随笔分类 -  Linq

Linq
摘要:1 public void Test(){2 3 var query = from a in A join b in B on A.Id equals B.Id into c4 from d in c.DefaultIfEmpty()5 ... 阅读全文
posted @ 2014-07-12 16:42 b̶i̶n̶g̶.̶ 阅读(275) 评论(0) 推荐(0) 编辑
摘要:Linq 中的 left join表A User:表B UserType:Linq: from t in UserType join u in User on t.typeId equal u.typeId into newtable from newtable.DefaultIfEmpty() ... 阅读全文
posted @ 2014-05-17 20:03 b̶i̶n̶g̶.̶ 阅读(194) 评论(0) 推荐(0) 编辑
摘要:今天在使用语言集成查询语句(linq)时,遇到模糊查询的问题,下面就是解决方案,最后决定记下来代码: list = list.Where(i => i.Name.Contains(empName)).ToList(); 相当于 %empName%list = list.Where(i => i.Name.StartWith(empName)).ToList();相当于 empName%list = list.Where(i => i.Name.EndWidth(empName)).ToList();相当于 %empName 阅读全文
posted @ 2013-05-20 09:55 b̶i̶n̶g̶.̶ 阅读(137) 评论(0) 推荐(0) 编辑