public void Schedule(AppointmentDoctor doctor, TimeSlot slot) { RaiseChangeEvent( AppointmentsDomain.Events.Appointment.DetailsChanged.Create(Id, doctor, slot)); RaiseChangeEvent( AppointmentsDomain.Events.Appointment.AppointmentStarted.Create(Id)); }
public static DetailsChanged Create(Identifier id, AppointmentDoctor doctor, TimeSlot slot) { return(new DetailsChanged { EntityId = id, StartUtc = slot.From, EndUtc = slot.To, DoctorId = doctor.DoctorId, ModifiedUtc = DateTime.UtcNow }); }