When producing a reader expression for NTS column, spatial type mappings use their own converters to modify the valueExpression in the CustomizeDataReaderExpression rather than going through normal converter process. Problem for AOT is that those converters capture SqlServerBytesReader object, which in turn uses NTS specific service (NtsGeometryServices) that we don't know about and can't effectively deal with using our liftable constant infra.
NTS is not supported in compiled model either so not huge priority, but we should deal with it in a proper way. For now just disable constant validation of that scenario by targeting a specific NTS type name, so not a very elegant solution.
When producing a reader expression for NTS column, spatial type mappings use their own converters to modify the valueExpression in the
CustomizeDataReaderExpression
rather than going through normal converter process. Problem for AOT is that those converters capture SqlServerBytesReader object, which in turn uses NTS specific service (NtsGeometryServices
) that we don't know about and can't effectively deal with using our liftable constant infra.NTS is not supported in compiled model either so not huge priority, but we should deal with it in a proper way. For now just disable constant validation of that scenario by targeting a specific NTS type name, so not a very elegant solution.