public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteGoodIdentificationTypeDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         GoodIdentificationTypesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _goodIdentificationTypeApplicationService.When(value as IDeleteGoodIdentificationType);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(DeleteGoodIdentificationTypeDto c)
        {
            var idObj         = (c as IDeleteGoodIdentificationType).GoodIdentificationTypeId;
            var uriParameters = new GoodIdentificationTypeUriParameters();

            uriParameters.Id = idObj;

            var q = new GoodIdentificationTypeDeleteQuery();

            q.CommandId   = c.CommandId;
            q.RequesterId = c.RequesterId;
            q.Version     = Convert.ToString(c.Version);

            var req = new GoodIdentificationTypeDeleteRequest(uriParameters);

            req.Query = q;

            var resp = await _ramlClient.GoodIdentificationType.Delete(req);

            GoodIdentificationTypeProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(DeleteGoodIdentificationTypeDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }