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

ODataQuery bound actions (with body) and bound functions (with parameters) #73

Open
buchatsky opened this issue Jan 28, 2023 · 1 comment

Comments

@buchatsky
Copy link
Collaborator

jinqu-odata version

1.1.3

Current behavior

Not available

Proposed behavior

  1. Executing actions bound to entity type using POST
await service.companies()
    .byKey(5)
    .action("Lock")
    .setData(value);
    .executeAsync();
  1. Executing functions bound to entity type using GET, with optional parameters
var result: Contractor = await service.companies()
    .byKey(5)
    .function("GetContractor")
    .withParameters({ country: "USA", revenue: 30000 })
    .executeAsync<Contractor>();

PS. Already implemented in my repository.

@buchatsky
Copy link
Collaborator Author

Functions without parameters should be called with parentheses.
This is the default behaviour of MS .Net OData services implementation. And this is also the default for Simple.OData.Client.
There is "RouteOptions.EnableNonParenthesisForEmptyParameterFunction" config param in OData services, but it does not cover both cases - only either-either (with XOR without parentheses).

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