예제 #1
0
        public GetCustomerResponse GetCustomerById(GetCustomerRequest request)
        {
            GetCustomerResponse response = new GetCustomerResponse();
            CustomerBusinessComponent bc = DependencyInjectionHelper.GetCustomerBusinessComponent();

            Customer customer = bc.GetCustomerById(request.CustomerId);
            response.Customer = CustomerAdapter.CustomerToDto(customer);

            return response;
        }
예제 #2
0
 public CustomerDTO GetCustomerById(int id)
 {
     try
     {
         GetCustomerRequest request = new GetCustomerRequest();
         request.CustomerId = id;
         GetCustomerResponse response = Service.GetCustomerById(request);
         return response.Customer;
     }
     catch (Exception ex)
     {
         if (ExceptionPolicy.HandleException(ex, "PL Policy")) throw;
         return new CustomerDTO();
     }
 }