예제 #1
0
 public void Save(Customer customer)
 {
     if (_customerCheckManager.CheckIfRealPerson(customer))
     {
         Console.WriteLine("Saved to db: " + customer.FirstName);
     }
     else
     {
         throw new Exception("Not a valid person");
     }
 }
예제 #2
0
 public void Add(Customer customer)
 {
     if (_customerCheckManager.CheckIfRealPerson(customer))
     {
         Console.WriteLine($"Customer added : { customer.FirstName}  { customer.LastName}");
     }
     else
     {
         throw new Exception("Not a valid person");
     }
 }