dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.82k stars 3.2k forks source link

Json: map non-primitive collections to JSON objects #28861

Open maumar opened 2 years ago

maumar commented 2 years ago

Currently collections are mapped to JSON arrays, we could map them to JSON objects instead.

roji commented 1 year ago

@maumar can you provide some context on what this means?

AndriySvyryd commented 1 year ago

This would allow to map collections of owned types as objects where one of the properties on the owned type is mapped to the object key and the value contains another JSON object containing the rest of the properties. In the client side it would still be a regular collection, as opposed to #21262