Ejemplo n.º 1
0
        internal static Appointment Create(DateTimeOffset dateOfAppointment, IAppendFacts parent)
        {
            var fact = new AppointmentCreatedFact() {Id = Guid.NewGuid(), DateOfAppointment = dateOfAppointment};

            var appointment = new Appointment(parent);
            appointment.Append(fact);
            appointment.Apply(fact);

            return appointment;
        }
Ejemplo n.º 2
0
 internal static Appointment HydrateFrom(AppointmentCreatedFact fact, Customer parent)
 {
     var appointment = new Appointment(parent);
     appointment.Apply(fact);
     return appointment;
 }