private void WhenCustomerLastNameChanged(CustomerLastNameChanged e, AllCustomersView view) { var existingCustomer = view.Customers.SingleOrDefault(x => x.Id == e.Id); if (existingCustomer == null) { throw new ApplicationException("Customer does not exist..."); } existingCustomer.LastName = e.LastName; }
protected void MutateWhen(CustomerLastNameChanged @event) { LastName = @event.LastName; }
private void WhenLastNameChanged(CustomerLastNameChanged e, CustomerView view) { view.LastName = e.LastName; }