代码如下:
DataQueryable countOfUser;
try{
countOfUser = ( from o in wkSpace.Application.Users
where o.FirstDate >= firstDate
where o.LastDate <= lastDate
where o.HasFinshed != true
where o.FinishDate != null
select o);
}
其中,FirstDate、LastDate、FinshDate是date类型,HasFinished是bool类型
现在的问题是,当我把后两句where去掉后,查询结果从有结果,变成没有结果了
where o.FirstDate >= firstDate
where o.LastDate <= lastDate
->
where o.FirstDate >= firstDate && LastDate <= lastDate
你的怎么那么多where 啊? where 之后应该用and 或or来连接其他条件