NHibernate 3 中的 In 集合查询

找了很久才发现怎么用,估计我是没有好好读文档。记录一下以备忘

private void Query(List<long> ids)
{
    Session.QueryOver<Sys_Func>().WhereRestrictionOn(c => c.ID).IsIn(ids.ToArray()).List()  
}

上面最关键的就是WhereRestrictionOn ,翻译过来我的理解是Where查询约束。

原文地址:https://www.cnblogs.com/format/p/2976934.html