linq按时间过滤

  

 DateTime dtEnd = DateTime.Now;
 var dtStart = dtEnd.AddDays(-7);
 return await _allResoursesRepository.GetAll().Where(x => x.CreationTime >= dtStart && x.CreationTime <= dtEnd).CountAsync();
原文地址:https://www.cnblogs.com/wangyinlon/p/13071076.html