Example #1
0
 public IList<User> LookupUsers(User user, AgeRange ageRange)
 {
     var lookupCriteria = BuildLookupCriteria(user);
     if(ageRange != null){
         var beginDate = new GetInDate(DateTime.Now).Subtract(ageRange.To);
         var endDate = new GetInDate(DateTime.Now).Subtract(ageRange.From);
         lookupCriteria.Add(Restrictions.Between("DateOfBirth", beginDate, endDate));
     }
     return lookupCriteria.List<User>();
 }
Example #2
0
 public virtual IList<User> LookupUsers(AgeRange ageRange)
 {
     return Repository.LookupUsers(this, ageRange);
 }