Exemplo n.º 1
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteLotDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         LotsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _lotApplicationService.When(value as IDeleteLot);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Exemplo n.º 2
0
        public async Task WhenAsync(DeleteLotDto c)
        {
            var idObj         = (c as IDeleteLot).LotId;
            var uriParameters = new LotUriParameters();

            uriParameters.Id = idObj;

            var q = new LotDeleteQuery();

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

            var req = new LotDeleteRequest(uriParameters);

            req.Query = q;

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

            LotProxyUtils.ThrowOnHttpResponseError(resp);
        }
Exemplo n.º 3
0
 public void When(DeleteLotDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }