public void Execute(AppointmentStarted @event) { Printer.Print(ConsoleColor.Magenta); var appointmentRepository = new MyRepository <Appointment>(); var appointment = appointmentRepository.Fetch(@event.AppointmentId); var jobRepository = new MyRepository <Job>(); var job = jobRepository.Fetch(appointment.JobId); job.Start(); //Printer.Print("Job marked as in progress", ConsoleColor.Magenta); }
public void Handle(AppointmentStarted @event) { Status = Status.InProgress; }