public void Delete(string id, string commandId, string version, string requesterId = default(string)) { try { var value = new DeletePhysicalInventoryLineMvoDto(); value.CommandId = commandId; value.RequesterId = requesterId; value.PhysicalInventoryVersion = (long)Convert.ChangeType(version, typeof(long)); PhysicalInventoryLineMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _physicalInventoryLineMvoApplicationService.When(value as IDeletePhysicalInventoryLineMvo); } catch (Exception ex) { var response = PhysicalInventoryLineMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(DeletePhysicalInventoryLineMvoDto c) { var idObj = PhysicalInventoryLineMvoProxyUtils.ToIdString((c as IDeletePhysicalInventoryLineMvo).PhysicalInventoryLineId); var uriParameters = new PhysicalInventoryLineMvoUriParameters(); uriParameters.Id = idObj; var q = new PhysicalInventoryLineMvoDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.PhysicalInventoryVersion); var req = new PhysicalInventoryLineMvoDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.PhysicalInventoryLineMvo.Delete(req); PhysicalInventoryLineMvoProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(DeletePhysicalInventoryLineMvoDto c) { WhenAsync(c).GetAwaiter().GetResult(); }