Skip to main content
All docs
V24.2
.NET 8.0+

XAF0032: Use the explicit syntax to create an instance of the CriteriaOperator class

Severity: Warning

Avoid implicit conversion of strings to CriteriaOperator. Use explicit syntax to create the CriteriaOperator instances instead.

For more information, refer to the following topics:

Examples

Invalid Code

CriteriaOperator criteria = "A > B";

Valid Code

CriteriaOperator criteria = CriteriaOperator.FromLambda<MyType>(x => x.A > x.B);
// or
CriteriaOperator criteria = CriteriaOperator.Parse("A > B");