public void AddExperienceArea(ExperienceArea newExperienceArea)
 {
     if (ExperienceAreas.Contains(newExperienceArea))
     {
         throw new InvalidOperationException("This Service Line already has that experience area");
     }
     ExperienceAreas.Add(newExperienceArea);
 }
        private ExperienceRating(Guid id, ExperienceArea experienceArea, RatingType type, int rating, IClock clock)
        {
            Id = id;
            ExperienceArea = experienceArea;
            Type = type;
            if (rating > 5 || rating < 0)
            {
                throw new InvalidDataException("A rating must be between 0 and 5");
            }
            Status = type == RatingType.Peer ? RatingStatus.Submitted : RatingStatus.Approved;

            if (type == RatingType.Self)
            {
                SelfRating = rating;
                PeerRating = 0;
                TimeOfSelfRating = clock.UtcNow;
            }
            else
            {
                PeerRating = rating;
                SelfRating = 0;
                TimeOfPeerRating = clock.UtcNow;
            }
        }
 public static ExperienceRating Create(Guid id, ExperienceArea experienceArea, RatingType type, int rating, IClock clock)
 {
     return new ExperienceRating(id, experienceArea, type, rating, clock);
 }