-
Notifications
You must be signed in to change notification settings - Fork 158
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
Cannot override GetModel method from EnableQueryAttribute #537
Comments
Looks like it was changed inadvertently because of where it is called, |
@julealgon I think you are right. it could be an accident. I'd like to revert it. @kjaworski if you want to return the model by yourself, now, you can set your model on the HttpRequest in the controller action. for example: public class controller...
{
[enablequery]
public IActionResult Get()
{
......
Request.ODataFeature().Model = yourmodel;
}
} |
@xuzhg Could you please prioritize this one? It prevents our company from upgrading our products to .NET 6. The workaround will do the trick of course, but we have hundreds of controllers decorating our attribute which inherits from The origin of our issue is extraction of |
Create a fork of the project, push your changes there, and then create a PR from your fork's branch into the main repo. |
Thanks! I didn't know the "forking" workflow yet. PR ready. |
Any plans for next release? When can we expect this? |
@kjaworski https://www.nuget.org/packages/Microsoft.AspNetCore.OData/8.0.9 is out. Please try and let me know any problems. |
@xuzhg Thanks a lot, works ok in 8.0.9! |
Before it was possible to override GetModel method from EnableQueryAttribute for customizations. That's also what "summary" doc says. But it was changed from "virtual" to "static" in this commit:
daba950
The text was updated successfully, but these errors were encountered: