コード例 #1
0
 public void Patch(string id, [FromBody] MergePatchPicklistRoleMvoDto value)
 {
     try {
         PicklistRoleMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _picklistRoleMvoApplicationService.When(value as IMergePatchPicklistRoleMvo);
     } catch (Exception ex) { var response = PicklistRoleMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
コード例 #2
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); }
 }
コード例 #3
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeletePicklistRoleMvoDto value)
        {
            try {
                // ///////////////////////////////
                if (value.PicklistVersion != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    PicklistRoleMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _picklistRoleMvoApplicationService.When(value as IMergePatchPicklistRoleMvo);
                    return;
                }
                // ///////////////////////////////

                PicklistRoleMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _picklistRoleMvoApplicationService.When(value as ICreatePicklistRoleMvo);
            } catch (Exception ex) { var response = PicklistRoleMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }