Ejemplo n.º 1
0
        public static WhereClip operator <=(ExpressionClip left, ExpressionClip right)
        {
            WhereClip where = new WhereClip();
            if (ExpressionClip.IsNullOrEmpty(right))
            {
                where = where.And(left, QueryOperator.LessOrEqual, null);
            }
            else if (ExpressionClip.IsNullOrEmpty(left))
            {
                where = where.And(right, QueryOperator.GreaterOrEqual, null);
            }
            else
            {
                where.And(left, QueryOperator.LessOrEqual, right);
            }

            return(where);
        }
Ejemplo n.º 2
0
        public static WhereClip operator !=(ExpressionClip left, ExpressionClip right)
        {
            WhereClip where = new WhereClip();
            if (ExpressionClip.IsNullOrEmpty(right))
            {
                where = where.And(left, QueryOperator.IsNULL, null).Not();
            }
            else if (ExpressionClip.IsNullOrEmpty(left))
            {
                where = where.And(right, QueryOperator.IsNULL, null).Not();
            }
            else
            {
                where.And(left, QueryOperator.NotEqual, right);
            }

            return(where);
        }