Exemple #1
0
 public static Customer CreateCustomer(Person person)
 {
     var customer = new Customer
         {
             Id = Guid.NewGuid(),
            // Person = new Person(),
             Person = person,
             No = "1",
         };
     return customer;
 }
Exemple #2
0
 public static Customer CreateCustomer(Person person,string no , float portion)
 {
     //Contract.Requires<ArgumentNullException>(person != null, "person");
     var customer = new Customer
     {
         Id = Guid.NewGuid(),
         Person = person,
         No = no,
         Portion = portion,
     };
     return customer;
 }