I have the following LINQ statement:
Items = Items.Where(p => p.LeadDatas.Any(
q =>
q.LeadField.Name == descriptor.Name &&
Convert.ToDouble(q.Value) == Convert.ToDouble(value)));
The q.Value
is a String value of a double, and value
is also a String value of a double, both of these needed to be converted to doubles so that they can be compared for equality.
When I debug over this LINQ statement, I am getting the following SQLException:
Error Converting data type varchar to float
I am not sure why it is not allowing me to do this, but I am wondering what the fix is, I need my two values to be compared for equality here.