public void Put(string id, [FromBody] CreateAttributeSetInstanceExtensionFieldGroupDto value)
 {
     try {
         AttributeSetInstanceExtensionFieldGroupsControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _attributeSetInstanceExtensionFieldGroupApplicationService.When(value as ICreateAttributeSetInstanceExtensionFieldGroup);
     } catch (Exception ex) { var response = AttributeSetInstanceExtensionFieldGroupsControllerUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
Example #2
0
        public HttpResponseMessage Post([FromBody] CreateAttributeSetInstanceExtensionFieldGroupDto value)
        {
            try {
                if (value.Id == default(string))
                {
                    throw DomainError.Named("nullId", "Aggregate Id in cmd is null, aggregate name: {0}.", "AttributeSetInstanceExtensionFieldGroup");
                }
                _attributeSetInstanceExtensionFieldGroupApplicationService.When(value as ICreateAttributeSetInstanceExtensionFieldGroup);
                var idObj = value.Id;

                return(Request.CreateResponse <string>(HttpStatusCode.Created, idObj));
            } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }
        public async Task WhenAsync(CreateAttributeSetInstanceExtensionFieldGroupDto c)
        {
            var idObj         = (c as ICreateAttributeSetInstanceExtensionFieldGroup).Id;
            var uriParameters = new AttributeSetInstanceExtensionFieldGroupUriParameters();

            uriParameters.Id = idObj;

            var req = new AttributeSetInstanceExtensionFieldGroupPutRequest(uriParameters, (CreateAttributeSetInstanceExtensionFieldGroupDto)c);

            var resp = await _ramlClient.AttributeSetInstanceExtensionFieldGroup.Put(req);

            AttributeSetInstanceExtensionFieldGroupProxyUtils.ThrowOnHttpResponseError(resp);
        }
 public void When(CreateAttributeSetInstanceExtensionFieldGroupDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }