查询
public List<CheckDataEntity> GetList() { Int64 startTime = Stopwatch.GetTimestamp();//获取计时器机制中当前时间的最小单位数 可以理解为时钟周期 var filterBuilder = Builders<CheckDataEntity>.Filter; var start = new DateTime(2023, 02, 06, 0, 0, 0); var end = (new DateTime(2023, 02, 22, 0, 0, 0)); List<CheckDataEntity> list = checkDataService.Find(x =>x.deviceAddress == "4"& (x.createTime >= start & x.createTime <= end)).ToList(); double endTime = (Stopwatch.GetTimestamp() - startTime) / (double)Stopwatch.Frequency;//获取以每秒计时周期数表示的计时器频率。此字段为只读 return list; }
标签:02,记录,MongoDB,List,DateTime,start,使用,var,new From: https://www.cnblogs.com/chenze-Index/p/17139627.html