It seems Solution 3 still may have edge cases that don't match.
Just compare the
.Date
property on the
DateTime
values:
CampCuisineDataContext db = new CampCuisineDataContext();
return db.Meals.Where(c => c.MealDate.Value.Date == date.Date &&
c.SessionID == SessionID &&
c.MealType == MealType).FirstOrDefault();
Also, your use of
.Value
on
c.MealDate
seems to imply that the
MealDate
column is
nullable and the expression needs to check that it actually
has a value.