public WhereClause(IEntityResolver entityResolver, QueryContainerDescriptor <TEntity> queryContainerDescriptor, ICondition condition = null) { _resolver = entityResolver; _condition = condition; _helper = new Helper <TEntity>(_resolver, queryContainerDescriptor); _expressionResolver = new Utils.ElasticSearch.Queries.Core.PredicateExpressionResolver <TEntity>(_resolver, queryContainerDescriptor); _queryContainerDescriptor = queryContainerDescriptor; }
/// <summary> /// Mustnot /// </summary> /// <param name="condition"></param> public void MustNot(ICondition condition) { condition = new MustNotCondition(condition); Must(condition); }
/// <summary> /// Should连接条件 /// </summary> /// <param name="condition">查询条件</param> public void Should(ICondition condition) { _condition = new ShouldCondition(_condition, condition); }
/// <summary> /// Must连接条件 /// </summary> /// <param name="condition">查询条件</param> public void Must(ICondition condition) { _condition = new MustCondition(_condition, condition); }