public AppointmentAggregate(LocalDateTime from, Period duration, int countOfSlot) { Slot = new AppointmentSlot() { Id = Guid.NewGuid().ToString(), From = from, Duration = duration, CountOfSlot = countOfSlot, }; }
public AppointmentAggregate(AppointmentSlot slot, IEnumerable <Appointment> appointments) { Slot = slot; Appointments.AddRange(appointments); }