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); } }
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 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); } }