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 async Task WhenAsync(DeleteMovementConfirmationLineMvoDto c) { var idObj = MovementConfirmationLineMvoProxyUtils.ToIdString((c as IDeleteMovementConfirmationLineMvo).MovementConfirmationLineId); var uriParameters = new MovementConfirmationLineMvoUriParameters(); uriParameters.Id = idObj; var q = new MovementConfirmationLineMvoDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.MovementConfirmationVersion); var req = new MovementConfirmationLineMvoDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.MovementConfirmationLineMvo.Delete(req); MovementConfirmationLineMvoProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(DeleteMovementConfirmationLineMvoDto c) { WhenAsync(c).GetAwaiter().GetResult(); }