Ejemplo n.º 1
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeletePartyDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         PartiesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _partyApplicationService.When(value as IDeleteParty);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Ejemplo n.º 2
0
        public async Task WhenAsync(DeletePartyDto c)
        {
            var idObj         = (c as IDeleteParty).PartyId;
            var uriParameters = new PartyUriParameters();

            uriParameters.Id = idObj;

            var q = new PartyDeleteQuery();

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

            var req = new PartyDeleteRequest(uriParameters);

            req.Query = q;

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

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