private void Apply(CustomerAccountCreated created) { Username = created.Username; Email = created.Email; FirstName = created.FirstName; Surname = created.Surname; }
public async Task Handle(CustomerAccountCreated m) { $"SAGA - acknowledging account creation for {Data.CustomerName}.".Log(); Data.AccountCreated = true; await _bus.Send(new SendWelcomePackToCustomer { CustomerName = Data.CustomerName }); // We're sending this to another endpoint. await _bus.SendLocal(new ScheduleASalesCall { CustomerName = Data.CustomerName }); // Use SendLocal the handler is in the same endpoint. Data.SalesCallScheduled = true; CheckComplete(); }
public async Task Handle(CustomerAccountCreated m) { Log.Information($"Customer account created for {m.Email} with ID {m.AccountId}."); Data.AccountId = m.AccountId; Data.AccountCreated = true; await _bus.Send(new SendWelcomeEmail { AccountId = Data.AccountId }); await _bus.Send(new ScheduleSalesCall { AccountId = Data.AccountId }); TryComplete(); }