Пример #1
0
        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);
        }
Пример #2
0
 public Customer(CreateCustomerCommand command)
 {
     var customerCreatedEvent = new CustomerCreatedEvent(command.CustomerId, command.FirstName, command.LastName, command.Email);
     RaiseEvent(customerCreatedEvent);
 }