Is it possible to get Nhibernate linq to generate a query with an "In" clause? e.g. - Where AnID in (x,y,z)?
+3
A:
I don't know the state of nHibernate with respect to generating all the potential LINQ queries, but you should be able to use .Contains()
to generate an IN.
var list = new int[] { x, y, x };
var q = db.Entities.Where( e => list.Contains( e.AnID ) );
tvanfosson
2010-03-30 16:37:34
Great, that works!
CocoB
2010-03-30 17:46:11