tags:

views:

168

answers:

2

Hi, 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 && endDate)

var appointmentNoShow =
    from a in appointments
    from p in properties
    from c in clients
    where a.Id == p.OID && (a.Start.Date >= startDate.Date && endDate)
+6  A: 

Just change it to

  var appointmentNoShow = from a in appointments
                                from p in properties
                                from c in clients
                                where a.Id == p.OID && (a.Start.Date >= startDate.Date && a.Start.Date <= endDate)
Giorgi
doah!thank you
David
You are welcome :)
Giorgi
+6  A: 
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
Andreas Niedermair