static void Main(string[] args) { var bootStrapper = new Bootstrapper(); var commandService = bootStrapper.Boot(); var createCustomerCommand = new CreateCustomerCommand() { CustomerId = Guid.NewGuid(), Email = "*****@*****.**", FirstName = "Simon", LastName = "Griffiths" }; commandService.ExecuteCommand(createCustomerCommand); }
public Customer(CreateCustomerCommand command) { var customerCreatedEvent = new CustomerCreatedEvent(command.CustomerId, command.FirstName, command.LastName, command.Email); RaiseEvent(customerCreatedEvent); }