efcore
efcore copied to clipboard
Json: for entities mapped to json with clr property Id, don't configure that property as key by convention
We don't support explicitly defined keys for json (yet), the convention would set the property to be a key and it will throw in validation. We should change the convention that marks properties as keys for entities mapped to json, so that they don't don anything.
Workaround if one really wants "Id" property in their JSON, is to name the clr property something else and use .HasJsonPropertyName("Id")