private void EndsWith() { Expression <Func <Student, bool> > exp = it => SqlFunc.EndsWith(it.Name, "a"); SqlServerExpressionContext expContext = new SqlServerExpressionContext(); expContext.Resolve(exp, ResolveExpressType.WhereSingle); var value = expContext.Result.GetString(); var pars = expContext.Parameters; base.Check(value, pars, " ([Name] like '%'+@MethodConst0) ", new List <SugarParameter>() { new SugarParameter("@MethodConst0", "a") }, "EndsWith"); }