public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteGoodIdentificationMvoDto();
         value.CommandId      = commandId;
         value.RequesterId    = requesterId;
         value.ProductVersion = (long)Convert.ChangeType(version, typeof(long));
         GoodIdentificationMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _goodIdentificationMvoApplicationService.When(value as IDeleteGoodIdentificationMvo);
     } catch (Exception ex) { var response = GoodIdentificationMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Ejemplo n.º 2
0
        public async Task WhenAsync(DeleteGoodIdentificationMvoDto c)
        {
            var idObj         = GoodIdentificationMvoProxyUtils.ToIdString((c as IDeleteGoodIdentificationMvo).ProductGoodIdentificationId);
            var uriParameters = new GoodIdentificationMvoUriParameters();

            uriParameters.Id = idObj;

            var q = new GoodIdentificationMvoDeleteQuery();

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

            var req = new GoodIdentificationMvoDeleteRequest(uriParameters);

            req.Query = q;

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

            GoodIdentificationMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }
Ejemplo n.º 3
0
 public void When(DeleteGoodIdentificationMvoDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }