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

fix enums could not be cast to decimal #576

Merged
merged 2 commits into from Mar 2, 2022

Conversation

jogibear9988
Copy link
Contributor

No description provided.

@StefH StefH added the feature label Feb 28, 2022
@StefH
Copy link
Collaborator

StefH commented Feb 28, 2022

@jogibear9988
Thank you for this PR.

But in normal C#, this cast is not valid:
image

So what is the reason DynamicLinq should support this?

@jogibear9988
Copy link
Contributor Author

I get a numeric value from Json, and I deserialize to Decimal, cause I don't want to lose decimal places.
And in my query string I compare against an enum. And I don't know the property type before parse.
In C# it is not valid, but in C# you always know the types, and you get a compiler error.
If it is not supported, I need to parse the string myself to get the type and then use dynamic linq

@StefH StefH merged commit e9ea307 into zzzprojects:master Mar 2, 2022
@jogibear9988
Copy link
Contributor Author

could you create a new nuget?

@jogibear9988 jogibear9988 deleted the fixEnums branch March 2, 2022 21:10
@StefH
Copy link
Collaborator

StefH commented Mar 3, 2022

I'll release it within a few days.

@StefH
Copy link
Collaborator

StefH commented Mar 7, 2022

New version is pushed to NuGet, this will be available soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

2 participants