This question is locked. New answers and comments are not allowed.
Having a frustrating time with a LINQ query used by order results by distance to a spatial point.
Any suggestions or ideas would be much appreciated.
This test query works.
Actual query with JOIN doesn't.
Telerik.OpenAccess Error: 2 : The query does not accept parameters, but valid params were passed for query execution.
A first chance exception of type 'Telerik.OpenAccess.OpenAccessException' occurred in Telerik.OpenAccess.dll
Any suggestions or ideas would be much appreciated.
This test query works.
SqlGeography point = SqlGeography.Point(QUERY_LAT, QUERY_LONG, 4326);var query = (from q in Data.Model.Place_Addresses orderby q.PLACE_ADDRESS_LOCATION.STDistance(point) select q).Take(50);Actual query with JOIN doesn't.
// Define base query.var point = SqlGeography.Point(QUERY_LAT, QUERY_LONG, 4326);var query = from q in Model.Place_Listings join pa in Model.Place_Addresses on q.PLACE_SEQ equals pa.PLACE_SEQ orderby pa.PLACE_ADDRESS_LOCATION.STDistance(point) select q;Telerik.OpenAccess Error: 2 : The query does not accept parameters, but valid params were passed for query execution.
A first chance exception of type 'Telerik.OpenAccess.OpenAccessException' occurred in Telerik.OpenAccess.dll