You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MySQL/MariaDB perform a floating point division for operands of any type (which is not the .NET behavior), while different DBMS' (SQL Server, Sqlite, PostgreSQL) perform an integer division if both operands are integer based types (which is the .NET behavior).
To make the behavior work in the same way as .NET (and other DBMS') does, we need to make use of the integer division operator DIV when translating queries.
Exposing the integer division operator as an explicit EF.Function extension method is tracked by #1932.
lauxjpn
changed the title
MySQL/MariaDB perform a floating point division for numbers of any type
MySQL/MariaDB perform a floating point division for operands of any type
Dec 11, 2024
MySQL/MariaDB perform a floating point division for operands of any type (which is not the .NET behavior), while different DBMS' (SQL Server, Sqlite, PostgreSQL) perform an integer division if both operands are integer based types (which is the .NET behavior).
To make the behavior work in the same way as .NET (and other DBMS') does, we need to make use of the integer division operator
DIV
when translating queries.Exposing the integer division operator as an explicit
EF.Function
extension method is tracked by #1932.Investigative work has been done in dotnet/efcore#35295.
The text was updated successfully, but these errors were encountered: