Fluent NHibernate does not create IN part of WHERE clause

后端 未结 3 457
借酒劲吻你
借酒劲吻你 2021-01-12 23:20

I have Fluent NHibernate Linq queries where I check values based on run time arrays. A basic example would be something like:

var array = [1,2,3,4,5,6];
usin         


        
3条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-12 23:37

    Can you use QueryOver and WhereRestrictionOn instead?

    session.QueryOver().WhereRestrictionOn(o => o.CompareVal).IsIn(array).List();
    

提交回复
热议问题