Exemplo n.º 1
0
 private Course(Guid id,
                CourseName courseName,
                CourseDescription courseDescription,
                Author author,
                List <Video> videos) : base(id)
 {
     CourseName        = courseName;
     CourseDescription = courseDescription;
     Author            = Guard.Argument(author, nameof(author)).NotNull();
     _videos           = new List <Video>();
     Guard.Argument(videos, nameof(videos)).NotNull();
     videos.ForEach(video => AddVideo(video));
 }
Exemplo n.º 2
0
 public virtual void UpdateName(string name)
 {
     CourseName = new CourseName(name);
 }