Example #1
0
 public void Patch(string id, [FromBody] MergePatchAttributeSetInstanceExtensionFieldDto value)
 {
     try {
         AttributeSetInstanceExtensionFieldsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _attributeSetInstanceExtensionFieldApplicationService.When(value as IMergePatchAttributeSetInstanceExtensionField);
     } catch (Exception ex) { var response = AttributeSetInstanceExtensionFieldsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Example #2
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteAttributeSetInstanceExtensionFieldDto();
         value.CommandId   = commandId;
         value.RequesterId = requesterId;
         value.Version     = (long)Convert.ChangeType(version, typeof(long));
         AttributeSetInstanceExtensionFieldsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _attributeSetInstanceExtensionFieldApplicationService.When(value as IDeleteAttributeSetInstanceExtensionField);
     } catch (Exception ex) { var response = AttributeSetInstanceExtensionFieldsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Example #3
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteAttributeSetInstanceExtensionFieldDto value)
        {
            try {
                // ///////////////////////////////
                if (value.Version != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    AttributeSetInstanceExtensionFieldsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _attributeSetInstanceExtensionFieldApplicationService.When(value as IMergePatchAttributeSetInstanceExtensionField);
                    return;
                }
                // ///////////////////////////////

                AttributeSetInstanceExtensionFieldsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _attributeSetInstanceExtensionFieldApplicationService.When(value as ICreateAttributeSetInstanceExtensionField);
            } catch (Exception ex) { var response = AttributeSetInstanceExtensionFieldsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }