Open chinadragon0515 opened 8 years ago
Hi, is this close or in the plan? I've found various samples but it appears there is currently no way to do geo.distance and geo.intersect with WebAPI via OData v4 and EF6, correct? Is there anything we can do to help? What's blocking?
I followed this article but am getting the error: “LINQ to Entities does not recognize the method ‘System.Nullable`1[System.Double] Distance(Microsoft.Spatial.Geography, Microsoft.Spatial.Geography)’ method, and this method cannot be translated into a store expression.”
Support geo related functions
Assemblies affected
Prefer to be in breaking change release
Reproduce steps
Expected result
The person will be returned.
Actual result
message: "Unknown function 'geo.distance'.", type: "System.NotImplementedException", stacktrace: " at System.Web.OData.Query.Expressions.FilterBinder.BindSingleValueFunctionCallNode(SingleValueFunctionCallNode node) at System.Web.OData.Query.Expressions.FilterBinder.Bind(QueryNode node) at System.Web.OData.Query.Expressions.FilterBinder.BindBinaryOperatorNode(BinaryOperatorNode binaryOperatorNode) at System.Web.OData.Query.Expressions.FilterBinder.Bind(QueryNode node) at System.Web.OData.Query.Expressions.FilterBinder.BindExpression(SingleValueNode expression, RangeVariable rangeVariable, Type elementType) at System.Web.OData.Query.Expressions.FilterBinder.Bind(FilterClause filterClause, Type filterType, IEdmModel model, IAssembliesResolver assembliesResolver, ODataQuerySettings querySettings) at System.Web.OData.Query.FilterQueryOption.ApplyTo(IQueryable query, ODataQuerySettings querySettings, IAssembliesResolver assembliesResolver) at System.Web.OData.Query.ODataQueryOptions.ApplyTo(IQueryable query, ODataQuerySettings querySettings) at System.Web.OData.Query.ODataQueryOptions.ApplyTo(IQueryable query, ODataQuerySettings querySettings, AllowedQueryOptions ignoreQueryOptions) at Microsoft.Restier.Publishers.OData.RestierController.ApplyQueryOptions(IQueryable queryable, ODataPath path, Boolean applyCount, Boolean& isIfNoneMatch, ETag& etag) in D:\dev\githome\RESTier.vin\src\Microsoft.Restier.Publishers.OData\RestierController.cs:line 607 at Microsoft.Restier.Publishers.OData.RestierController.d__7.MoveNext() in D:\dev\githome\RESTier.vin\src\Microsoft.Restier.Publishers.OData\RestierController.cs:line 126