protected void When(RegisteredDomainEvent domainEvent) { Id = domainEvent.AggregateRootId; Version = domainEvent.Version; Name = domainEvent.CustomerName; PIN = domainEvent.CustomerPIN; Accounts = new AccountCollection(); Accounts.Add(domainEvent.AccountId); }
public virtual void Register(Guid accountId) { Accounts = new AccountCollection(); Accounts.Add(accountId); }
protected Customer() { Accounts = new AccountCollection(); }