-
Notifications
You must be signed in to change notification settings - Fork 161
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
$expand not working with ODataQueryOptions in the backend #1290
Comments
Do not use I'd also recommend applying the entire |
@renatolombardo I had a PR to provide extension for customers to 'cast' the result of $select and $expand to its origin 'type', you can refer to this 'PR. It's still looking forward the review from the team. |
I have a controller which has OdataQueryOptions as a parameter, as follows:
And here is the call:
After the return Ok(employees), the filter and expand are correctly applied.
Also, filteredResults returns the correct results, with $filter applied. expandedResults returns null.
Here is the SelectExpand property:
And here's the OData configuration:
And the OData statement:
The reason is that I'm trying to use the same filter applied in the frontend to export the exact same result to an Excel file, so I need $expand and $filter to work properly. In this case, $expand is not working within the controller. Only after the result is returned.
The text was updated successfully, but these errors were encountered: