Beispiel #1
0
        public static bool OlderThan(this UserModel userModel, int threshold)
        {
            var  specification = new OlderThanSpecification(threshold);
            bool result        = specification.IsSatisfied(userModel);

            return(result);
        }
Beispiel #2
0
        public static IQueryable <UserModel> OlderThan(this IQueryable <UserModel> userModels, int threshold)
        {
            var specification = new OlderThanSpecification(threshold);

            return(userModels.Where(specification.Expression));
        }