-
Notifications
You must be signed in to change notification settings - Fork 481
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
LINQ: Enums convertor using System.Text.Json is not working #4388
Comments
@v-mghabin The code proposed in #3250 is incorrect. I had a discussion with the user here- #2685 (comment) Also please note that you need to be using the preview version of the newest release. This feature is not yet available in the public version. Here is an example of how you could implement
|
@Maya-Painter |
@v-mghabin it will be part of the next public package, which we are hoping to release in the next couple weeks |
@Maya-Painter |
@v-mghabin Apologies for the delay, there are some failing gates blocking the release. More discussion here - #4412 |
3.39 has been released, thanks everyone for your patience. |
I've followed this #3250 but sounds it didn't solve the Enums conversation to strings.
The latest solution from that issue is to use a custom serializer
CosmosSystemTextJsonSerializer
that inheritsCosmosSerializer
andCosmosLinqSerializer
but that won't work becauseCosmosLinqSerializer
is internal class and can't be inherited due to protection level.My main issue that when trying to use LINQ and filter items based on Enum that has been converted to string, it is not returning any result because it compares the converted string with int.
Record in DB
Enum in C# converted using System.Text.Json Convertor:
The text was updated successfully, but these errors were encountered: