Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Use Operator enum value ( https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Operator.html ) instead of string for WhereFilter.
It's used in DataManagerRequest (https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.DataManagerRequest.html )
It prevent to used a big switch with static values :
private Operator SfOperatorStringToEnum(string sfOperator)
{
Operator filter = Operator.None;
switch (sfOperator)
{
case "lessthan":
filter = Operator.LessThan;
break;
case "greaterthan":
filter = Operator.GreaterThan;
break;
case "lessthanorequal":
filter = Operator.LessThanOrEqual;
break;
case "greaterthanorequal":
filter = Operator.GreaterThanOrEqual;
break;
case "startswith":
filter = Operator.StartsWith;
break;
case "endswith":
filter = Operator.EndsWith;
break;
case "contains":
filter = Operator.Contains;
break;
case "equals":
filter = Operator.Equal;
break;
case "notequals":
filter = Operator.NotEqual;
break;
default:
break;
}
return filter;
}