The Math.Round function isn't supported by LINQ to entities (I assume that means using LINQ with the entity framework dbset) but I really need to round the double in query to filter lots of rows according to the user input.
User input is 4 digits after point and doubles in db can be any size.
Is there a way to round double in the query?
UPDATE:
Basically user enters some number in filter of the table column. Lets say it's a weight of fruits.
So for example user enters weight as 4.2152 and the column must filter all the fruits whose weight is 4.21515 or 4.215212 etc.
And in the database there are many fruits which weight is like 4.21514543543643
RESULT
So after a day long struggle I decided to use the range condition. Although it's not quite a solution. If user enters 4.2152 then range filters with condition bigger then 4.21515. But it will filter out the 4.215149 value which would otherwise be rounded to 4.2152.
The problem is solved but not exactly as needed :(