odata.net icon indicating copy to clipboard operation
odata.net copied to clipboard

No support for async writing of spatial values

Open habbes opened this issue 1 year ago • 1 comments

ODL writes spatial JSON values synchronously even in async code. See: https://github.com/OData/odata.net/blob/master/src/Microsoft.OData.Core/JsonLight/ODataJsonLightValueSerializer.cs#L707

The solution here is to provide an async PrimitiveTypeConverter.WriteJsonLightAsync(), which would require also making some converters and writers in the Microsoft.Spatial library async.

Assemblies affected

Microsoft.OData.Core 7.x

habbes avatar Jun 14 '23 15:06 habbes

The Microsoft.Spatial types are not compatible with the spatial data types used in the database. For that reason, most customers are unable to use the types in the Microsoft.Spatial library in LINQ expression targeting databases. There may not be much benefit in spending more resources on Microsoft.Spatial library. Most customers use the Net Topology Suite (NTS) because it supports mapping of spatial data types in the database to NTS types. It might make more sense to switch Microsoft.Spatial library with the NTS.

gathogojr avatar Feb 16 '24 13:02 gathogojr