Beispiel #1
0
        private void Length()
        {
            Expression <Func <Student, bool> > exp        = it => SqlFunc.Length("aaaa") > 1;
            SqlServerExpressionContext         expContext = new SqlServerExpressionContext();

            expContext.Resolve(exp, ResolveExpressType.WhereSingle);
            var value = expContext.Result.GetString();
            var pars  = expContext.Parameters;

            base.Check(value, pars, "(LEN(@MethodConst0) > @Const1 )", new List <SugarParameter>()
            {
                new SugarParameter("@MethodConst0", "aaaa"), new SugarParameter("@Const1", 1)
            }, "Length error");
        }