/// <summary> /// The Save method adds the Customer (this) object to the internal data structure. /// </summary> public void Save() { if (this.customerID > 0) { DataCustomer.Update(this); } else { this.customerID = DataCustomer.Add(this); } }
/// <summary> /// The static Add method interacts with the DataLayer in order to /// add a received object to the internal structure. /// </summary> /// <param name="transaction">The Customer object that you want to add</param> public static void Add(Customer customer) { DataCustomer.Add(customer); }