Back to list
Views:   7.6K
Replies:  1

Question about the Criterion class in the Framework

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.



Dennis Tucker, Jul 18, 2012
Reply 1

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

Samet Gunaydin, Nov 20, 2012
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.