You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ICollection for related entities is too permissive. #857
It's a pity that we cannot have entities with read-only collections. It's a must for any Domain-Driven Design approach in order to enforce rules and restrictions. In a rich model (not anemic), entities are usually responsible for keeping relationships consistent with the model.
Forcing the usage of writeable collections makes it easy to violate those rules and restrictions of the domain. Please, improve it.
At least, we need a way to make Entity Framework work behind the stage to fill and navigate relations like it already does, but also provide means to avoid every collection to have methods like Add, Delete or Insert.
This is a part of the work we want to complete for #240. Leaving this issue open as we may not complete this part of the work in the initial RTM of EF7.
BTW we should add that a reliance on ICollection is not baked into the EF7 code base, we have a small component at the moment that knows how to handle ICollection but the plan is to supplement this with the ability to provide code that configures how to add/remove items.
Activity
rowanmiller commentedon Oct 22, 2014
This is a part of the work we want to complete for #240. Leaving this issue open as we may not complete this part of the work in the initial RTM of EF7.
rowanmiller commentedon Oct 22, 2014
BTW we should add that a reliance on ICollection is not baked into the EF7 code base, we have a small component at the moment that knows how to handle ICollection but the plan is to supplement this with the ability to provide code that configures how to add/remove items.
ajcvickers commentedon Jul 8, 2016
Dupe of #752