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

FromODataUriAttribute binds string property as number #2852

Open
janis938 opened this issue Aug 20, 2024 · 2 comments
Open

FromODataUriAttribute binds string property as number #2852

janis938 opened this issue Aug 20, 2024 · 2 comments

Comments

@janis938
Copy link

When using the [FromODataUri] attribute for a string property starting with a digit, it gets interpreted as a number.

Reproduce steps

In Controller: [FromODataUri] string appId. Then send request localhost:5004/controller?appId=105E84FF1024

Expected result

appId = "105E84FF1024"

Actual result

appId = "Infinity"

@paulodero
Copy link

The string should be single quoted localhost:5004/controller?appId='105E84FF1024'

@paulodero paulodero transferred this issue from OData/odata.net Aug 20, 2024
@janis938
Copy link
Author

But why is it that when using the [FromQuery] attribute it works without the quotes and not with?

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

2 participants