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

recommended spatial solution causes ODataActionParams to be null #1428

Open
MolallaComm opened this issue Feb 27, 2025 · 0 comments
Open

recommended spatial solution causes ODataActionParams to be null #1428

MolallaComm opened this issue Feb 27, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@MolallaComm
Copy link
Contributor

MolallaComm commented Feb 27, 2025

I added a Point property to my entity following this guide:

https://devblogs.microsoft.com/odata/customizing-filter-for-spatial-data-in-asp-net-core-odata-8/

It seems a bit convoluted, but worked fine, in that I can query my "LocationDTO" entity and run spatial filters/orderbys as expected. However, now when I try to use that entity as a parameter for actions, it doesn't work anymore - for instance:

            var srvaddstep1 = builder.EntityType<ServiceDTO>().Collection.Action("AddStep1");
            srvaddstep1.Parameter<AccountDTO>("Account");
            srvaddstep1.Parameter<LocationDTO>("Location");

With the spatial column added, the ODataActionParameters in my controller function is always null - despite the fact I can see that the client is sending what looks like the proper JSON. If I comment out the spatial stuff in LocationDTO, everything goes back to working as expected (i.e. ODataActionParameters in my controller is no longer null).

Using latest/greatest odata on .netcore 8

@MolallaComm MolallaComm added the bug Something isn't working label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant