public GetOrderResponse GetOrderById(GetOrderRequest request) { GetOrderResponse response = new GetOrderResponse(); OrderBusinessComponent bc = DependencyInjectionHelper.GetOrderBusinessComponent(); response.Order = OrderAdapter.OrderToDto(bc.GetOrderById(request.Id)); return response; }
public GetOrderResponse GetOrderById(GetOrderRequest request) { if (!HttpContext.Current.User.Identity.IsAuthenticated) throw new FaultException<NotAuthenticatedFault>(new NotAuthenticatedFault()); GetOrderResponse response = new GetOrderResponse(); OrderBusinessComponent bc = DependencyInjectionHelper.GetOrderBusinessComponent(); response.Order = OrderAdapter.OrderToDto(bc.GetOrderById(request.Id)); return response; }
public OrderDTO GetOrderById(int id) { try { GetOrderRequest request = new GetOrderRequest(); request.Id = id; GetOrderResponse response = Service.GetOrderById(request); return response.Order; } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "PL Policy")) throw; return new OrderDTO(); } }