public Customer(SSN ssn, Name name)
 {
     Id        = Guid.NewGuid();
     SSN       = ssn;
     Name      = name;
     _accounts = new AccountCollection();
 }
 public Customer(Guid id, Name name, SSN ssn, AccountCollection accounts)
 {
     Id        = id;
     Name      = name;
     SSN       = ssn;
     _accounts = accounts;
 }
 public Customer(SSN ssn, Name name, Gender gender)
 {
     Id        = Guid.NewGuid();
     SSN       = ssn;
     Name      = name;
     Gender    = gender;
     _accounts = new AccountCollection();
 }
        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);
        }
Beispiel #5
0
 public virtual void Register(Guid accountId)
 {
     Accounts = new AccountCollection();
     Accounts.Add(accountId);
 }
Beispiel #6
0
 protected Customer()
 {
     Accounts = new AccountCollection();
 }