public void Patch(string id, [FromBody] MergePatchOrderShipGroupMvoDto value) { try { OrderShipGroupMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _orderShipGroupMvoApplicationService.When(value as IMergePatchOrderShipGroupMvo); } catch (Exception ex) { var response = OrderShipGroupMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public void Delete(string id, string commandId, string version, string requesterId = default(string)) { try { var value = new DeleteOrderShipGroupMvoDto(); value.CommandId = commandId; value.RequesterId = requesterId; value.OrderVersion = (long)Convert.ChangeType(version, typeof(long)); OrderShipGroupMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _orderShipGroupMvoApplicationService.When(value as IDeleteOrderShipGroupMvo); } catch (Exception ex) { var response = OrderShipGroupMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteOrderShipGroupMvoDto value) { try { // /////////////////////////////// if (value.OrderVersion != default(long)) { value.CommandType = CommandType.MergePatch; OrderShipGroupMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _orderShipGroupMvoApplicationService.When(value as IMergePatchOrderShipGroupMvo); return; } // /////////////////////////////// OrderShipGroupMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _orderShipGroupMvoApplicationService.When(value as ICreateOrderShipGroupMvo); } catch (Exception ex) { var response = OrderShipGroupMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }