Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for GroupBy and Aggregate at OData Client #596

Closed
jvitor83 opened this issue Jun 15, 2016 · 6 comments
Closed

Support for GroupBy and Aggregate at OData Client #596

jvitor83 opened this issue Jun 15, 2016 · 6 comments
Labels
client only related to OData.Client feature in-progress P3

Comments

@jvitor83
Copy link

jvitor83 commented Jun 15, 2016

Actually the Microsoft OData Clients for .NET "OData Connected Service or OData v4 Client Code Generator" (Microsoft.OData.Client.dll[DataServiceQuery]) don't support making groupby and aggregate queries to consume the OData v4 service which already has support for those (See addicional details).

Assemblies affected

Microsoft.OData.Client.dll

Reproduce steps

or using RESTier (https://odata.github.io/RESTier/)
or using WebApi (https://odata.github.io/WebApi/)

  • Create a Client

or using the "OData Connected Service (https://visualstudiogallery.msdn.microsoft.com/b343d0eb-6493-44c2-b558-13a0408d013f)"

or using the "OData v4 Client Code Generator (https://visualstudiogallery.msdn.microsoft.com/9b786c0e-79d1-4a50-89a5-125e57475937)"

  • Make a query which has a group by - Ex: "client.Users.GroupBy(user => user.Login).ToList();"

Expected result

http://localhost/odata/Users?$apply=groupby((Login));

Actual result

It throws "An unhandled exception of type 'System.NotSupportedException' occurred in Microsoft.OData.Client.dll - The method 'GroupBy' is not supported".

Additional details

Support for group by and aggregation on the service - OData/WebApi#70

@LaylaLiu LaylaLiu changed the title Support for GroupBy and Aggregate at OData Connected Service Support for GroupBy and Aggregate at OData Client Jun 20, 2016
@LaylaLiu
Copy link
Contributor

@jvitor83, I updated this issue.

Currently, OData client doesn't support aggregate.We would like to have it to be fixed in the ODataLib, but at this point we are spending all resources on a breaking changes release that have a hard deadline. So we want to know the priority of these issues on your side. We would happily accept your pull requests as well. So if you have time to implement this feature, we'd love to merge it into the library.

@kodenine
Copy link

+1 OData has been great, but in order to meet new requirements we need aggregation or we'll have to implement something outside of OData.

@thebarks
Copy link

Has there been any movement on this issue? Are there plans to include grouping functionality in the client?

@beqa7137
Copy link

Hello, is there any update on this issue?
I'm using Microsoft.AspNetCore.OData v7.1.0 and have a problem when trying to use groupby with aggregate functions, but just groupby itself works fine

@madansr7 madansr7 added the client only related to OData.Client label Sep 30, 2019
@habbes
Copy link
Contributor

habbes commented Jun 28, 2022

Support for this feature is being added by the following PR: #1925

@gathogojr
Copy link
Contributor

Fixed by #1925

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client only related to OData.Client feature in-progress P3
Projects
None yet
Development

No branches or pull requests

10 participants