public static void UpdateCustomer(int customerId, Customer customer, UpdateCustomerDelegate updateCustomerDelegate) { SqlConnection connection = new SqlConnection(ConnectionString); connection.Open(); updateCustomerDelegate(connection, customerId, customer); connection.Close(); }
public void UpdateCustomer(int customerId, Customer customer) { UpdateCustomerDelegate delegateInstanceObj = new UpdateCustomerDelegate(PerformUpdate); CustomerRepository.UpdateCustomer(customerId, customer, delegateInstanceObj); }