How to create AND OR statements in NHibernate

You’re looking for the Conjunction and Disjunction classes, these can be used to combine various statements to form OR and AND statements.

AND


.Add(

Expression.Conjunction()

.Add(criteria)

.Add(other_criteria)

)

OR


.Add(

Expression.Disjunction()

.Add(criteria)

.Add(other_criteria)

)

PTI Junior Programmer Asked on September 19, 2016 in C#.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.