NHibernate IQueryable collection as property of root

前端 未结 3 1420
时光说笑
时光说笑 2021-02-13 12:15

I have a root object that has a property that is a collection.

For example:

I have a Shelf object that has Books.

// Now
public class Shelf 
{
    publ         


        
3条回答
  •  轮回少年
    2021-02-13 12:32

    Perhaps you should give Nhibernate Linq a try. It allows you use the IQueryable and do things like:

    Session.Linq().Where(b => b.Name == "The Great Gatsby");
    

提交回复
热议问题