public void A()
        {
            Expression <Func <int, bool> > expr = x => x + 5 < 10;
            var str = JsExpressionVisitor.ExpressionToString(expr);

            Assert.Equal("x => ((x + 5) < 10)", str);
        }
예제 #2
0
        public IActionResult Get()
        {
            Expression <Func <double, bool> > expression = x => x > 100;

            return(Ok(new
            {
                Predicate = JsExpressionVisitor.ExpressionToString(expression),
                ErrorMessage = "Price must > 100"
            }));
        }