Spatial linq queries not working

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
vmakkenz
Posts: 24
Joined: Tue 26 Aug 2008 13:30

Spatial linq queries not working

Post by vmakkenz » Thu 18 Nov 2021 10:46

I'm trying to do a simple linq query retrieving the building that contains a point

Code: Select all

        var point = new GeometryFactory().CreatePoint(new Coordinate(233569.922, 556664.502));
        var buildings = db.Building.Where(g => g.Geometry.Contains(point));
But I keep getting mapping errors

System.InvalidOperationException : Expression '@__point_0' in SQL tree does not have type mapping assigned.

Code: Select all

        var buildings = db.Building.Where(g => g.Geometry.Contains(new GeometryFactory().CreatePoint(new Coordinate(233569.922, 556664.502))));
System.InvalidOperationException : Expression 'POINT (233569.922 556664.502)' in SQL tree does not have type mapping assigned.

Using
DevArt 9.14.1369
.NET 5.0/6.0

Shalex
Site Admin
Posts: 9424
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Sat 20 Nov 2021 11:10

You are working with EF Core 5 and NetTopologySuite 2.1, aren't you?

We will investigate the issue with mapping errors and notify you.

vmakkenz
Posts: 24
Joined: Tue 26 Aug 2008 13:30

Re: Spatial linq queries not working

Post by vmakkenz » Tue 23 Nov 2021 10:57

Yes we are using Devart 9.14.1369 and dotnet 6

Packages
Devart.Data.Oracle.EFCore.NetTopologySuite 9.14.1369
- Devart.Data.Oracle.EFCore 9.14.1369
- Microsoft.EntityFrameworkCore.Relational 5.0.11
- NetTopologySuite 2.1.0

Shalex
Site Admin
Posts: 9424
Joined: Thu 14 Aug 2008 12:44

Re: Spatial linq queries not working

Post by Shalex » Wed 24 Nov 2021 11:19

The investigation is in progress. As soon as we have any results, we will contact you.

vmakkenz
Posts: 24
Joined: Tue 26 Aug 2008 13:30

Re: Spatial linq queries not working

Post by vmakkenz » Wed 24 Nov 2021 12:19

Just to be sure we upgraded to the latest version 9.14.1382

Packages
Devart.Data.Oracle.EFCore.NetTopologySuite 9.14.1382
- Devart.Data.Oracle.EFCore 9.14.1382
- Microsoft.EntityFrameworkCore.Relational 5.0.12
- NetTopologySuite 2.1.0

But we still get the SQL tree does not have type mapping assigned error

Post Reply