Thanks - the EF Distance() worked. I don't use Geography for that matching - so all good. Obviously multiple operators like Buffer().Contains() obviously break the index process.
how to include a spatial index in c# EF
Stephen Cameron
0
Reputation points
This query is not using the spatial index: (@__point_0 sys.geometry)SELECT TOP(1) [t].[Id], [t].[Bus_StopsId], [t].[Point]
FROM [TripRef_Stops] AS [t]
WHERE [t].[Point].STBuffer(5.0000000000000002E-05).STContains(@__point_0) = CAST(1 AS bit) - it is transformed from c# in EF