예제 #1
0
        public QueryFluent <TEntity> Where(IBoolValue value)
        {
            switch (_where)
            {
            case null:
                _where = value;
                break;

            case AndOperatorFluent op:
                switch (value)
                {
                case AndOperator value2:
                    op.Union(value2);
                    break;

                case AndOperatorFluent value2:
                    op.Union(value2);
                    break;

                default:
                    op.AddValue(value);
                    break;
                }
                break;

            default:
                switch (value)
                {
                case AndOperator value2:
                    var op = new AndOperatorFluent(_where);
                    op.Union(value2);
                    _where = op;
                    break;

                case AndOperatorFluent value2:
                    op = new AndOperatorFluent(_where);
                    op.Union(value2);
                    _where = op;
                    break;

                default:
                    _where = new AndOperatorFluent(_where, value);
                    break;
                }
                break;
            }
            return(this);
        }
예제 #2
0
 public void Union(AndOperatorFluent other) => _values.AddRange(other._values);