public IQueryBuilder <T> And(IConjunction <T> conjunction) { var conj = QueryBuilderUtil.GetConjunction(conjunction); _query.And(conj); return(this); }
public static Conjunction GetConjunction <T>(IConjunction <T> conjunction) where T : class, IDataItem { if (conjunction == null) { throw new ArgumentNullException("conjunction"); } if (conjunction is NHibernateConjunction <T> ) { if (conjunction is NHibernateConjunction <T> conj) { return(conj.Conjunction); } throw new InvalidCastException("Unable to cast conjunction to NHibernateConjunction<T>."); } throw new ArgumentException("Argument must be an instance of NHibernateConjunction<T>", "conjunction"); }