-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 CosmosSerializer and CosmosSerializationOptions in the Cosmos Provider #24334
Conversation
@@ -560,6 +621,8 @@ public override long GetServiceProviderHashCode() | |||
hashCode = (hashCode * 131) ^ (Extension._gatewayModeMaxConnectionLimit?.GetHashCode() ?? 0); | |||
hashCode = (hashCode * 397) ^ (Extension._maxTcpConnectionsPerEndpoint?.GetHashCode() ?? 0); | |||
hashCode = (hashCode * 131) ^ (Extension._maxRequestsPerTcpConnection?.GetHashCode() ?? 0); | |||
hashCode = (hashCode * 131) ^ (Extension._serializer?.GetHashCode() ?? 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about this code. can anyone explain how to implement it in a proper way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add more tests and fix the behavior.
@@ -127,6 +127,34 @@ public async Task Should_throw_if_specified_connection_mode_is_wrong() | |||
}); | |||
} | |||
|
|||
[ConditionalFact] | |||
public async Task Should_use_serialization_options() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just for example. I actually don't know where I should put tests for this.
Also, after SaveChanges
, the Name
will be stored with null
. It seems I missed something. Can it be some Tests configuration? Could you please help?
…e Cosmos Provider
#20670 and #17306 should be implemented after #18753 and #14570 are done |
Hi @AndriySvyryd |
@Marusyk We can upgrade to a feature complete preview of V4, this should give us enough time before release |
In any case a better approach would be to expose the options on OptionsBuilder directly |
Added support for CosmosSerializationOptions and CosmosSerializer
It is a very useful feature when we want to ignore null values when saving data in CosmosDb with Entity Framework
https://stackoverflow.com/questions/66424039/ignore-null-values-when-saving-data-in-cosmosdb-with-entity-framework
Fixes #20670
Please review
Thank you in advance