Ejemplo n.º 1
0
 public void Patch(string id, [FromBody] MergePatchAttributeAliasMvoDto value)
 {
     try {
         AttributeAliasMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _attributeAliasMvoApplicationService.When(value as IMergePatchAttributeAliasMvo);
     } catch (Exception ex) { var response = AttributeAliasMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Ejemplo n.º 2
0
 public void Delete(string id, string commandId, string version, string requesterId = default(string))
 {
     try {
         var value = new DeleteAttributeAliasMvoDto();
         value.CommandId        = commandId;
         value.RequesterId      = requesterId;
         value.AttributeVersion = (long)Convert.ChangeType(version, typeof(long));
         AttributeAliasMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _attributeAliasMvoApplicationService.When(value as IDeleteAttributeAliasMvo);
     } catch (Exception ex) { var response = AttributeAliasMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Ejemplo n.º 3
0
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeleteAttributeAliasMvoDto value)
        {
            try {
                // ///////////////////////////////
                if (value.AttributeVersion != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    AttributeAliasMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _attributeAliasMvoApplicationService.When(value as IMergePatchAttributeAliasMvo);
                    return;
                }
                // ///////////////////////////////

                AttributeAliasMvosControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _attributeAliasMvoApplicationService.When(value as ICreateAttributeAliasMvo);
            } catch (Exception ex) { var response = AttributeAliasMvosControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }