I need to compare just the date only in a Linq query that involves a datetime field. However, the syntax below results in the following error message
datetime
<
You can do it like bellow:
var data1 = context.t_quoted_value.Where(x => x.region_name == "Pakistan" && x.price_date.Value.Year == dt.Year && x.price_date.Value.Month == dt.Month && x.price_date.Value.Day == dt.Day).ToList();