public static int GetCustomerID(string customerName, LoadCustomerNameFromDBDelegate loadCustomerNameFromDBDelegate) { SqlConnection connection = new SqlConnection(ConnectionString); connection.Open(); int result = loadCustomerNameFromDBDelegate(connection, customerName); connection.Close(); return(result); }
public int GetCustomerID(string customerName) { LoadCustomerNameFromDBDelegate delegateInstance = new LoadCustomerNameFromDBDelegate(PerformGetCustomerByID); return(CustomerRepository.GetCustomerID(customerName, delegateInstance)); }