コード例 #1
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteUomDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         UomsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _uomApplicationService.When(value as IDeleteUom);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #2
0
        public async Task WhenAsync(DeleteUomDto c)
        {
            var idObj         = (c as IDeleteUom).UomId;
            var uriParameters = new UomUriParameters();

            uriParameters.Id = idObj;

            var q = new UomDeleteQuery();

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

            var req = new UomDeleteRequest(uriParameters);

            req.Query = q;

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

            UomProxyUtils.ThrowOnHttpResponseError(resp);
        }
コード例 #3
0
 public void When(DeleteUomDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }