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
When dealing with Domain-Driven Design, the default set of collections offered by .NET are not sufficient. It would be nice to have a generic reusable collection of Entities that offers the functionality needed.
So what is needed? Let's summarize what I think is needed:
Implements IReadOnlyList<TEntity>.
Defined order of its elements.
Guaranteed uniqueness of elements based on their ID.
Possibility to get elements by their ID.
Add(TEntity entity) that throws when the enetity is null or the ID allready exists.
AddOrUpdate(Tentity entity) that updates the entity (on the same spot) or adds it at the end, if new.
Sort the collection, optional with a custom comparer
Clear the collection
Access to read-only collection of the identifiers
Any toughts? And should it be part of Qowaiv, or Qowaiv.DomainModel? (or a new package, although I would not prefer that?)
The text was updated successfully, but these errors were encountered:
When dealing with Domain-Driven Design, the default set of collections offered by .NET are not sufficient. It would be nice to have a generic reusable collection of Entities that offers the functionality needed.
So what is needed? Let's summarize what I think is needed:
IReadOnlyList<TEntity>
.Add(TEntity entity)
that throws when the enetity is null or the ID allready exists.AddOrUpdate(Tentity entity)
that updates the entity (on the same spot) or adds it at the end, if new.Any toughts? And should it be part of Qowaiv, or Qowaiv.DomainModel? (or a new package, although I would not prefer that?)
The text was updated successfully, but these errors were encountered: