public void A() { Expression <Func <int, bool> > expr = x => x + 5 < 10; var str = JsExpressionVisitor.ExpressionToString(expr); Assert.Equal("x => ((x + 5) < 10)", str); }
public IActionResult Get() { Expression <Func <double, bool> > expression = x => x > 100; return(Ok(new { Predicate = JsExpressionVisitor.ExpressionToString(expression), ErrorMessage = "Price must > 100" })); }