How would one do the following in NHibernate?
SELECT ContactName, ContactTel1, ContactTel2, ContactTel3
FROM tb_Contact
WHERE (ContactTel1 LIKE '%6440%') OR
(ContactTel2 LIKE '%6440%') OR
(ContactTel3 LIKE '%6440%')
This is what I have, but can't figure out how to do the same with multiple columns.
all = session.CreateCriteria(typeof(Contact)).Add(Expression.Like(pField, "6440", MatchMode.Anywhere))
.List<Contact>();
Any pointers much appreciated.