public void Patch(string id, [FromBody] MergePatchOrderDto value) { try { OrdersControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _orderApplicationService.When(value as IMergePatchOrder); } catch (Exception ex) { var response = OrdersControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteOrderDto value) { try { // /////////////////////////////// if (value.Version != default(long)) { value.CommandType = CommandType.MergePatch; OrdersControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _orderApplicationService.When(value as IMergePatchOrder); return; } // /////////////////////////////// OrdersControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _orderApplicationService.When(value as ICreateOrder); } catch (Exception ex) { var response = OrdersControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }