public StoreOrderResponse StoreOrder(StoreOrderRequest request) { StoreOrderResponse response = new StoreOrderResponse(); OrderBusinessComponent bc = DependencyInjectionHelper.GetOrderBusinessComponent(); Order order = OrderAdapter.DtoToOrder(request.Order); IEnumerable<ChangeItem> changeItems = OrderAdapter.GetChangeItems(request.Order, order); response.Id = bc.StoreOrder(order, changeItems); return response; }
public void StoreOrder(OrderDTO order) { try { StoreOrderRequest request = new StoreOrderRequest(); request.Order = order; StoreOrderResponse response = Service.StoreOrder(request); order.Id = response.Id; } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "PL Policy")) throw; } }