public void On(ISubscriptionContext <Guid> context, UserSignedUp evt) { Owner = evt.UserId; Created = evt.Timestamp; LastModified = evt.Timestamp; Balance = 0; }
public void On(ISubscriptionContext <string> context, UserSignedUp evt) { Created = evt.Timestamp; FullName = evt.FullName; InitialCredentials = evt.InitialCredentials; Accounts.Add(evt.SavingsAccountId); Accounts.Add(evt.CheckingAccountId); }
public void On(ISubscriptionContext <Guid> context, UserSignedUp evt) { Owner = evt.UserId; Created = evt.Timestamp; LastModified = evt.Timestamp; if (evt.CheckingAccountId == context.Key) { Type = AccountType.Checking; Balance = 10; } else if (evt.SavingsAccountId == context.Key) { Type = AccountType.Savings; Balance = 0; } }