efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Json: for entities mapped to json with clr property Id, don't configure that property as key by convention

Open maumar opened this issue 2 years ago • 0 comments

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")

maumar avatar Aug 04 '22 22:08 maumar