public static bool TallerThan(this UserModel userModel, int threshold) { var specification = new TallerThanSpecification(threshold); bool result = specification.IsSatisfied(userModel); return(result); }
public static IQueryable <UserModel> TallerThan(this IQueryable <UserModel> userModels, int threshold) { var specification = new TallerThanSpecification(threshold); return(userModels.Where(specification.Expression)); }