PostgreSql.EFCore: problem querying spatial data

PostgreSql.EFCore: problem querying spatial data

Hello

I migrated from .Net Framework to .NET Core 6.0 and have a problem querying spatial data.

DbContext is extended with:
optionsBuilder.UsePostgreSql(connectionString, options => { options.UseNetTopologySuite(); });

I use database first approach, the geometry columns are mapped to NetTopologySuite.Geometries.Geometry

If I query the table, I get an System.InvalidOperationException: 'No coercion operator is defined between types 'System.Byte[]' and 'NetTopologySuite.Geometries.Geometry'

Used versions:
dotConnect 8.1.151
NetTopologySuite 2.4.0 (tried 2.5.0 as well)
EntityFrameworkCore 7.0.9

What am I doing wrong?

Best regards,
Christine