public void Patch(string id, [FromBody] MergePatchMovementConfirmationLineMvoDto value) { try { MovementConfirmationLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _movementConfirmationLineMvoApplicationService.When(value as IMergePatchMovementConfirmationLineMvo); } catch (Exception ex) { var response = MovementConfirmationLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public void Delete(string id, string commandId, string version, string requesterId = default(string)) { try { var value = new DeleteMovementConfirmationLineMvoDto(); value.CommandId = commandId; value.RequesterId = requesterId; value.MovementConfirmationVersion = (long)Convert.ChangeType(version, typeof(long)); MovementConfirmationLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _movementConfirmationLineMvoApplicationService.When(value as IDeleteMovementConfirmationLineMvo); } catch (Exception ex) { var response = MovementConfirmationLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteMovementConfirmationLineMvoDto value) { try { // /////////////////////////////// if (value.MovementConfirmationVersion != default(long)) { value.CommandType = CommandType.MergePatch; MovementConfirmationLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _movementConfirmationLineMvoApplicationService.When(value as IMergePatchMovementConfirmationLineMvo); return; } // /////////////////////////////// MovementConfirmationLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _movementConfirmationLineMvoApplicationService.When(value as ICreateMovementConfirmationLineMvo); } catch (Exception ex) { var response = MovementConfirmationLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }