You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
He asked me on how to do the same for EF Core using CosmosDb provider.
I didn't find a way to set serialization options when configuring the DbContext with UseCosmos, only a subset of CosmosDb options is available.
Reading the source code I could see that the serializer instance used internally is created with JsonSerializer.Create() which, according to Newtonsoft documentation, won't use JsonConvert.DefaultSettings.
Is this by design? Is there any way to change serialization settings for CosmosDb provider?
EF Core version: 6+
Database provider: (e.g. Microsoft.EntityFrameworkCore.Cosmos)
Thanks in advance,
The text was updated successfully, but these errors were encountered:
I have a customer who uses this code snippet to change default null value handling behavior for JSON serialization when using the CosmosDb client:
He asked me on how to do the same for EF Core using CosmosDb provider.
I didn't find a way to set serialization options when configuring the DbContext with UseCosmos, only a subset of CosmosDb options is available.
Reading the source code I could see that the serializer instance used internally is created with
JsonSerializer.Create()
which, according to Newtonsoft documentation, won't useJsonConvert.DefaultSettings
.Is this by design? Is there any way to change serialization settings for CosmosDb provider?
EF Core version: 6+
Database provider: (e.g. Microsoft.EntityFrameworkCore.Cosmos)
Thanks in advance,
The text was updated successfully, but these errors were encountered: