Пример #1
0
        public Customer GetCustomerByID(int customerID)
        {
            try
            {
                Customer customer = CustomerAccessor.FetchCustomerByID(customerID);

                if (customer != null)
                {
                    return(customer);
                }
                else
                {
                    throw new ApplicationException("There were no records found.");
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Пример #2
0
 /// <summary>
 /// Gets the customer by identifier.
 /// </summary>
 /// <param name="customerId">The customer identifier.</param>
 /// <returns>Customer.</returns>
 public Customer GetCustomerById(int customerId)
 {
     return(CustomerAccessor.FetchCustomerByID(customerId));
 }