Skip to content

Instantly share code, notes, and snippets.

@DominicFinn
Created June 6, 2014 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominicFinn/49c3a4cb96b29c9a9bb8 to your computer and use it in GitHub Desktop.
Save DominicFinn/49c3a4cb96b29c9a9bb8 to your computer and use it in GitHub Desktop.
Example
public class Appointment : IAggregateRoot
{
public Appointment(Guid id, AppointmentType type, .....)
{
switch type
{
case: AppointmentType.TypeOne
Apply(new TypeOneAppointmentCreated());
case: AppointmentType.TypeTwo
Apply(new TypeTwoAppointmentCreated());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment