Support for Query By Example.
Namespace: NHibernate.CriterionAssembly: NHibernate (in NHibernate.dll) Version: 3.2.0.4000 (3.2.0.4000)
Syntax
C# |
---|
[SerializableAttribute] public class Example : AbstractCriterion |
Visual Basic |
---|
<SerializableAttribute> _ Public Class Example _ Inherits AbstractCriterion |
Visual C++ |
---|
[SerializableAttribute] public ref class Example : public AbstractCriterion |
Remarks
"Examples" may be mixed and matched with "Expressions" in the same ICriteria
Examples
CopyC#
List results = session.CreateCriteria(typeof(Parent)) .Add( Example.Create(parent).IgnoreCase() ) .CreateCriteria("child") .Add( Example.Create( parent.Child ) ) .List();