C# Linq Where Date Between 2 Dates

后端 未结 8 2031
鱼传尺愫
鱼传尺愫 2020-11-28 07:30

I\'m trying to get my linq statement to get me all records between two dates, and I\'m not quite sure what I need to change to get it to work: (a.Start >= startDate

相关标签:
8条回答
  • 2020-11-28 08:02
    var appointmentNoShow = from a in appointments
                            from p in properties
                            from c in clients
                            where a.Id == p.OID
                            where a.Start.Date >= startDate.Date
                            where a.Start.Date <= endDate.Date
    
    0 讨论(0)
  • 2020-11-28 08:05
    var QueryNew = _context.Appointments.Include(x => x.Employee).Include(x => x.city).Where(x => x.CreatedOn >= FromDate).Where(x => x.CreatedOn <= ToDate).Where(x => x.IsActive == true).ToList();
    
    0 讨论(0)
提交回复
热议问题