Anybody know how I can create an "In" restriction using Linq to NHibernate.
i.e. generate SQL like
开发者_如何学Pythonselect p.Name from Person p where p.City In ('London', 'New York', 'Auckland')
thanks.
OK, I worked this out. Can do:
from p in session.Query<Person>
where cities.Contains(p.City)
select p
where cities is an array of city names
Anyone know a good reference for Linq to NHibernate examples?
精彩评论