域驱动设计:聚集具有大量集合的根 [英] 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.
赞:
public class AggregateRoot
{
public ICollection<Child> Children { get; set; } // 10.000 entities
}
我将如何查询子级集合以获取特定子级?我正在使用Nhibernate btw.
How would I query the child collection to get specific children? I am using Nhibernate btw.
推荐答案
您可以使用Nhibernate的收集过滤器为此,请参见
You can use Nhibernate's collection filters for this, see this similar question for examples.
这篇关于域驱动设计:聚集具有大量集合的根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文