-
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
How to specify SerializerOptions when working with UseCosmos ? #28270
Comments
EF actually doesn't use the names provided by the serializer. You can specify the desired name during model building: And similarly for embedded entities:
You can also use the |
How to mention IgnoreNullValues = true in UseCosmos options? |
Ask a question
When instantiating a CosmosClient directly, I can do something like:
which allows me to specify the desired SerializerOptions (specifically the PropertyNamingPolicy).
But when I'm leveraging EF Core with UseCosmosDb similar to:
, how could I achieve the samer result where I specify "PropertyNamingPolicy = CosmosPropertyNamingPolicy.CamelCase" for the CosmosDB connection which the EF Core context will use?
Include provider and version information
EF Core version: 6.0.6
Database provider: (e.g. Microsoft.EntityFrameworkCore.Cosmos)
Target framework: (e.g. .NET 6.0)
Operating system:
IDE: (e.g. Visual Studio 2022 17.2.4)
The text was updated successfully, but these errors were encountered: