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

Filter Forces Key Based Lookup #859

Closed
groogiam opened this issue Mar 11, 2022 · 1 comment
Closed

Filter Forces Key Based Lookup #859

groogiam opened this issue Mar 11, 2022 · 1 comment

Comments

@groogiam
Copy link

groogiam commented Mar 11, 2022

It appears that

ODataClient.For<TEntity>().Filter(f => f.Id == EntityId);

does not preserve the $filter semantic and gets translated to a key based url TEntity('EntityId'). This creates issues with the ASP.NET core implementation as $expands have to be explicitly implemented on a key based lookup but work as part of the framework when doing a filter.
See
OData/AspNetCoreOData#520
OData/WebApi#1188

This really does not seem like the correct behavior because it overrides the intent of the programmer to perform a filter.

@groogiam
Copy link
Author

ASP.NET Core SingleResult fixes the issue in ASP.NET Core. See OData/AspNetCoreOData#520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant