将这句sql改成lambda,在线等
select a from table where a like '__'
用lambda语句来写这句sql怎么写啊,大家帮个忙
------解决方案--------------------like么,可以这么写
table.Where(x=>x.Contains(“xxx”));
还有就是StartWith,EndsWith或者用正则
------解决方案--------------------
额
table.Where(x => x.a.Length == 2).Select(x => x.a)
这样的?
------解决方案--------------------table.Where(x => x.a!=null&&x.a.Length == 2)
------解决方案--------------------table.Where(x => x.a!=null&&x.a.Length == 2)
被4#抢先回答了,4L正确答案