예제 #1
0
파일: Method.cs 프로젝트: zdl8061/sqlsugar
        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");
        }