Skip to content

Aggregation extensions in OData ASP.NET Core fail when using SQL Server #2293

Open
@henrikdahl8240

Description

@henrikdahl8240

https://devblogs.microsoft.com/odata/aggregation-extensions-in-odata-asp-net-core/ shows how some typical everyday situations can be solved using OData.

I use SQL Server and not some in-memory stuff like the article deals with.

If I aim for doing a simple groupBy like http://localhost:5000/odata/Orders?$apply=groupby((Customer/Name), aggregate($count as OrderCount)) I receive an exception like:

System.InvalidOperationException: Processing of the LINQ expression 'GroupByShaperExpression:
...
' by 'RelationalProjectionBindingExpressionVisitor' failed. This may indicate either a bug or a limitation in EF Core. See https://go.microsoft.com/fwlink/?linkid=2101433 for more detailed information.

Do the constructions at https://devblogs.microsoft.com/odata/aggregation-extensions-in-odata-asp-net-core/ actually work as you use SQL Server.

I am using .NET 5.0 RC1 and Microsoft.AspnetCore.OData 7.4.1.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions