public void Reschedule(DateTime from, DateTime to) { Printer.Print(ConsoleColor.Cyan); var @event = new AppointmentRescheduled(Id, from, to); Apply(@event); DomainEvents.Publish(@event); }
public void Apply(AppointmentRescheduled @event) { TimeSlot = new TimeSlot(@event.From, @event.To); }