Closed levalencia closed 5 years ago
Hello and thanks for using Cosmonaut.
As the Github Readme page stages in the Restrictions section
Because of the way the internal id property of Cosmosdb works, there is a mandatory restriction made. You cannot have a property named Id or a property with the attribute [JsonProperty("id")] without it being a string. A cosmos id need to exist somehow on your entity model. For that reason if it isn't part of your entity you can just implement the ICosmosEntity interface or extend the CosmosEntity class.
The recommended fix in your case would be to decrate the TenantId
with the [JsonProperty("id")]
attribute.
If you like the library make sure you give it a star. It really helps.
Can you help me here? great library btw!
https://stackoverflow.com/questions/51468975/adding-a-cosmosdb-entity-unable-to-resolve-id-for-entity-of-type-tenant