Anybody know how I can create an “In” restriction using Linq to NHibernate.
i.e. generate SQL like
select p.Name
from Person p
where p.City In (‘London’, ‘New York’, ‘Auckland’)
thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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?