Esempio n. 1
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeletePicklistDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         PicklistsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _picklistApplicationService.When(value as IDeletePicklist);
     } catch (Exception ex) { var response = PicklistsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(DeletePicklistDto c)
        {
            var idObj         = (c as IDeletePicklist).PicklistId;
            var uriParameters = new PicklistUriParameters();

            uriParameters.Id = idObj;

            var q = new PicklistDeleteQuery();

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

            var req = new PicklistDeleteRequest(uriParameters);

            req.Query = q;

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

            PicklistProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(DeletePicklistDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }