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