public void Delete(string id, string commandId, string version, string requesterId = default(string)) { try { var value = new DeleteAttributeSetDto(); value.CommandId = commandId; value.RequesterId = requesterId; value.Version = (long)Convert.ChangeType(version, typeof(long)); AttributeSetsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value); _attributeSetApplicationService.When(value as IDeleteAttributeSet); } catch (Exception ex) { var response = AttributeSetsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); } }
public async Task WhenAsync(DeleteAttributeSetDto c) { var idObj = (c as IDeleteAttributeSet).AttributeSetId; var uriParameters = new AttributeSetUriParameters(); uriParameters.Id = idObj; var q = new AttributeSetDeleteQuery(); q.CommandId = c.CommandId; q.RequesterId = c.RequesterId; q.Version = Convert.ToString(c.Version); var req = new AttributeSetDeleteRequest(uriParameters); req.Query = q; var resp = await _ramlClient.AttributeSet.Delete(req); AttributeSetProxyUtils.ThrowOnHttpResponseError(resp); }
public void When(DeleteAttributeSetDto c) { WhenAsync(c).GetAwaiter().GetResult(); }