随笔分类 - 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 ...
阅读全文
摘要: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() ...
阅读全文
摘要:今天在使用语言集成查询语句(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
阅读全文