Remove RemoveConvert (To avoid float conversion to integer) #13908
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
customer-reported
type-bug
Milestone
I ran into an issue with query generation in Entity Framework Core 2.1.
I have a query
with
KostenSchweissen.Grenze
being an integer, butewd
being a float.So this looks for the first line with a "Grenze" greater or equal the value that is passed down.
This ran fine previously (EF Core 1.x, not sure about 2.0), but now it's generating the query (from SQL Server Profiler):
where
ewd
was 17.1. So this completely ignores that ewd is a float, obviously returning wrong costs. Casting to a double or float in the query doesn't work, the only workaround that I could come up with iswhich is obviously not nice since it involves DB-side calculation. The query is not performance critical in my case, but I'm still wondering: Is this a bug, or considered a feature? If so, why? Isn't this at least a breaking change that should have been announced somewhere? Or am I just to blind to find it?
I have tried to find any hint in the EF documentation - release notes, breaking changes, forums, Stackoverflow... but couldn't find anything.
I would be thankful for any hint as to relevant documentation, best practices or whatever else could be helpful for this problem. And if this is the wrong format for asking a question like this, please forgive me.
Further technical details
EF Core version: 2.1.2
Database Provider: Microsoft.EntityFrameworkCore.SqlServer
Operating system: Windows 10 Pro, 1803
IDE: Visual Studio 2017 15.8.9
The text was updated successfully, but these errors were encountered: