- 博客(2)
- 收藏
- 关注
原创 group by in linq
想实现一个从数据库根据某个字段和一定条件查询记录条数的方法:1.先取字段的可能情况,再通过循环去数据库查询:var conversations = Repository.FindAll().AsExpandable().Where(t => t.IsHidden == false && t.Status != ConversationStatus.Closed &&a...
2018-04-08 14:14:50
184
原创 SQL 查询Exist的EF实现
编写查询语句时,经常要用到if exist的判断方法。list的lambda表达式中可以有 List<Agent> agentList = new List<Agent>(); agentList.Exists(t => t.Id == 1);但是你会发现无法直接用于linq to SQL中:System.NotSupportedExcepti...
2018-03-28 16:13:34
3141
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人