Reputation: 263
I am using Microsoft.EntityFramework.Cosmos 3.1.3 NuGet Package to read and write using Entity Framework to Azure Cosmos DB Documents.
Everything is working fine, but one thing annoys me. EF writes null values for strings, nullable types or empty arrays to Cosmos Documents. This wouldn't be a problem if these empty values wouldn't be extra costs in terms of RUs, storage etc.
How can I instruct EF not to write null values or empty collections to Cosmos DB?
Upvotes: 0
Views: 939
Reputation: 393
EF team told me that this is not supported yet. There is a request for it. You can follow it from the following page. https://github.com/dotnet/efcore/issues/20670
Upvotes: 1