DDD: entity's collection and repositories

前端 未结 7 1158
隐瞒了意图╮
隐瞒了意图╮ 2021-01-30 12:04

Suppose I have

public class Product: Entity
{
   public IList Items { get; set; }
}

Suppose I want to find an item with max someth

7条回答
  •  时光说笑
    2021-01-30 12:30

    You can now do that with NHibernate 5 directly without specific code ! It won't load the whole collection into memory.

    See https://github.com/nhibernate/nhibernate-core/blob/master/releasenotes.txt

    Build 5.0.0
    =============================
    
    ** Highlights
    ...
        * Entities collections can be queried with .AsQueryable() Linq extension without being fully loaded.
    ...
    

提交回复
热议问题