Skip to content

Instantly share code, notes, and snippets.

@codescribler
Created October 7, 2014 12:32
Show Gist options
  • Save codescribler/26553ffa7daaca99788d to your computer and use it in GitHub Desktop.
Save codescribler/26553ffa7daaca99788d to your computer and use it in GitHub Desktop.
public class CustomerCreated : Event
{
public readonly int Id;
public readonly string CustomerName;
public CustomerCreated(int id, string customerName)
{
Id = id;
CustomerName = customerName;
}
}
public class OrderPlaced : Event
{
public readonly int Id;
public readonly int OrderTotal;
public readonly DateTime OrderDate;
// You could put some line item data here - omitted for brevity
public OrderPlaced(int id, int orderTotal, DateTime orderDate)
{
Id = id;
OrderTotal = orderTotal;
OrderDate = orderDate;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment