Domain Driven Design: Aggregate roots with large collections
I was wondering how I would handle aggregate roots that contain collections with a lot of entities.
Like:
public class AggregateRoot
{
public ICollection<Child> Children { get; set; } // 10.000 entities
}
开发者_JS百科
How would I query the child collection to get specific children? I am using Nhibernate btw.
You can use Nhibernate's collection filters for this, see this similar question for examples.
精彩评论