Пример #1
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeletePicklistRoleMvoDto();
         value.CommandId       = commandId;
         value.RequesterId     = requesterId;
         value.PicklistVersion = (long)Convert.ChangeType(version, typeof(long));
         PicklistRoleMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _picklistRoleMvoApplicationService.When(value as IDeletePicklistRoleMvo);
     } catch (Exception ex) { var response = PicklistRoleMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public async Task WhenAsync(DeletePicklistRoleMvoDto c)
        {
            var idObj         = PicklistRoleMvoProxyUtils.ToIdString((c as IDeletePicklistRoleMvo).PicklistRoleId);
            var uriParameters = new PicklistRoleMvoUriParameters();

            uriParameters.Id = idObj;

            var q = new PicklistRoleMvoDeleteQuery();

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

            var req = new PicklistRoleMvoDeleteRequest(uriParameters);

            req.Query = q;

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

            PicklistRoleMvoProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(DeletePicklistRoleMvoDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }