date between entity framework code example

Example 1: entity framework where date between

var query = from a in Context.Assignments
            from m in monthList
            where m >= a.StartDate && m <= a.EndDate
            select new { a.SomeProperty, a.AnotherProperty };

Example 2: entity framework where date between

....
&&
(
    s.Created_at.Value.Day >= dateStart.Day && s.Created_at.Value.Day <= dateEnd.Day &&
    s.Created_at.Value.Month >= dateStart.Month && s.Created_at.Value.Month <= dateEnd.Month &&
    s.Created_at.Value.Year >= dateStart.Year && s.Created_at.Value.Year <= dateEnd.Year
)).count();