Пример #1
0
 /// <summary>
 /// 生成where命令。
 /// </summary>
 /// <param name="operator">逻辑操作符。</param>
 /// <param name="expressions">表达式。</param>
 /// <returns></returns>
 public virtual IWhereExpression Where(WhereOperators @operator, params string[] expressions)
 {
     if (expressions != null)
     {
         foreach (string expression in expressions)
         {
             if (string.IsNullOrEmpty(expression))
             {
                 continue;
             }
             string key = _dialect.ReplaceKeyword(expression);
             if (_wheres.ContainsKey(key))
             {
                 continue;
             }
             _wheres.Add(key, @operator);
         }
     }
     return(this);
 }