Entity Framework Core 5.0 with NetTopologySuite.Geometries.Polygon throws The supplied value is not a valid instance of data type geography. Check the source data for invalid values. An example of an invalid value is data of numeric type with scale greater than precision. #24621
Labels
I have same issue as here but with SQL Server.
I am passing
Polygon
property asNULL
but in query I see this@p2='0x00000000010C9D94826842394940000000D05D863E40'
I have a
Bookmark
entity withBoundaries
property of typePolygon
. In some cases, it will not be provided so should be null.Creating and saving as
after calling
this is getting logged on console
with and exception
However following query work fine (when queried manually directly against SQL Server Express
Why is EF Core passing
@p2='0x00000000010C9D94826842394940000000D05D863E40'
instead ofNULL
?EF Core version: 5.0.5
Database provider: Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite 5.0.5
Target framework: .NET 5.0
Operating system: Windows 10
IDE: Rider 2021.1
P.S. I tried to pass empty Polygon but that results in another exception complaining that
Ring has fewer than 4 points, so orientation cannot be determined
.The text was updated successfully, but these errors were encountered: