예제 #1
0
        public static Course Create(CourseId id, CourseName name, CourseDuration duration)
        {
            Course course = new Course(id, name, duration);

            course.Record(new CourseCreatedDomainEvent(id.Value, name.Value, duration.Value));

            return(course);
        }
예제 #2
0
 public Course(CourseId id, CourseName name, CourseDuration duration)
 {
     Id       = id;
     Name     = name;
     Duration = duration;
 }