KleeGroup / kinetix-tools

Toolbox for Kinetix
Apache License 2.0
1 stars 2 forks source link

[ModGen] Private setters is an issue #6

Open c3dr0x opened 6 years ago

c3dr0x commented 6 years ago

Having private setter on aggregates objects and lists is an issue when using EF. It forces the use of temporary objects to store a denorm of the final object and to construct it after querying.

JabX commented 6 years ago

The issue isn't specific to EF at all. The problem arises every time we want to create a new object that contains a composed object (or list) during any query (sure during EF queries, but also during any regular linq to objects one too).

Making sure the composed object in always at least initialized is one (good) thing, but forcing the use of (auto) mapping to fill it is IMO one step too far (and ICollection doesn't even have the AddRange() method).