Question about the Criterion class in the Framework

 
108   96.7
Jul 18, 2012
 
I have a question about the Criterion class. in the code they have :
var criterion = new Criterion(sort, order, "CategoryId", Operator.Equals, categoryId);

Does that class only work if you are passing 1 parameter? Because I see they have a search method with multiple parameters and they do not use the Criterion class, they just added a search method to the interface with the required parameters.

Thanks

Dennis




60   95.3
Nov 20, 2012

Yo can do like that,
Criterion criterion = null;
            criterion.AddFilter("role", Operator.Equals, roleName);
            criterion.AddFilter("username", Operator.Equals, usernameToMatch);
            return _user.FindUsersInRole(criterion);