I am having two date values, one already stored in the database and the other selected by the user using DatePicker. The use case is to search for a particular date from the
DateTime date_time_to_compare = DateTime.Now;
//Compare only date parts
context.YourObject.FirstOrDefault(r =>
EntityFunctions.TruncateTime(r.date) == EntityFunctions.TruncateTime(date_to_compare));