Example #1
0
 public Comment(User commentor, User commentedOn, String content)
 {
     Commentor = commentor;
     CommentedOn = commentedOn;
     Content = content;
     CommentedOn.AddCommentToProfile(this);
     CommentDate = new GetInDate(DateTime.Now);
 }
Example #2
0
 public Comment(User commentor, User commentedOn, String content, GetInDate myDate)
 {
     Commentor = commentor;
     CommentedOn = commentedOn;
     Content = content;
     CommentedOn.AddCommentToProfile(this);
     CommentDate = myDate;
 }
Example #3
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 #4
0
 public bool Equals(GetInDate other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.Value.Equals(Value);
 }