public static void UpdateCustomer(EditableWorldCustomer customer) { EditableWorldCustomer editableCustomer = GetEditableCustomerByID(customer.CustomerId); if (editableCustomer == null) { return; } editableCustomer.CustomerName = customer.CustomerName; editableCustomer.CountryId = customer.CountryId; editableCustomer.CityId = customer.CityId; }
public static void InsertCustomer(EditableWorldCustomer customer) { var newCustomer = new EditableWorldCustomer() { CustomerId = GetNewEditableCustomerID(), CustomerName = customer.CustomerName, CountryId = customer.CountryId, CityId = customer.CityId }; GetEditableCustomers().Add(newCustomer); }