public Customer(SSN ssn, Name name) { Id = Guid.NewGuid(); SSN = ssn; Name = name; _accounts = new AccountCollection(); }
public void LoadAccounts(ICollection <Guid> accountIds) { _accounts = new AccountCollection(); foreach (var account in accountIds) { _accounts.Add(account); } }
public void Register(IAccount account) { if (Accounts == null) { Accounts = new AccountCollection(); } Accounts.Add(account.Id); }
public static Customer Load(Guid id, Name name, SSN ssn, AccountCollection accounts) { Customer customer = new Customer(); customer.Id = id; customer.Name = name; customer.SSN = ssn; customer._accounts = accounts; return(customer); }
public Customer() { Accounts = new AccountCollection(); }
public virtual void Register(Guid accountId) { Accounts = new AccountCollection(); Accounts.Add(accountId); }
protected Customer() { Accounts = new AccountCollection(); }