Hello!
I have two classes:
public class Person{
public virtual string Name { get; set;}
public virtual Address Address { get; set; }
}
public class Address{
public virtual string Street { get; set; }
}
Now I want NHibernate to give me all Persons where Name is equal to "Xyz" or Address.Street is equal to "Xyz".
This approach is an and-conjunction:
ICriteria criteria = session.CreateCriteria(typeof(Person));
criteria.Add(Expression.Eq("Name", "Xyz"))
.CreateCriteria("Address").Add(Expression.Eq("Street", "Xyz"));
What I want is and or-clause.
Thank you very much! Andy