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

Add support for Enums as Key in OData Client and Allow $filter with integer value in squote and without squote #3018

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

WanjohiSammy
Copy link
Contributor

Description

Cherry-pick c313eae and 3080ebc into dev-8.x branch

Checklist (Uncheck if it is not completed)

  • Test cases added
  • Test case modified
  • Build and test with one-click build and test script passed

* Checkout from 'main'

* Add and modify test cases

* Only allow nullable Generic Type Enum

* Adding a test that throws Exception if key is nullable generic type with struct as generic argument

* Adding a test to mock querying data with enum as keys

* Add a test to select single entity

* Add test to filter by enum member name and a test to use ByKey to filter by composite keys

* Add a test to filter by enum key only using ByKey()
…#3014)

* Allow comparison with underlying integral for Enum member and add capability to convert integral value to enum member name

* Bump with tests

* Move helper methods to EnumHelper, use them to check for enum values and adds more tests to handle float, long and int.

* Use explicit/exact type instead of 'var'

* Add more tests to handle huge, long values

* Add assertion for comparing enum member name with the result

* Move extension methods from Edm EnumHelper.cs to Core in EdmExtensionMethods.cs
@WanjohiSammy WanjohiSammy merged commit bd08585 into dev-8.x Jul 23, 2024
5 checks passed
@WanjohiSammy WanjohiSammy deleted the fix/cherry-pick--c313eae-and-3080ebc-commits branch August 23, 2024 05:49
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

Successfully merging this pull request may close these issues.

2 participants