public async Task WhenAsync(CreateGoodIdentificationTypeDto c)
        {
            var idObj         = (c as ICreateGoodIdentificationType).GoodIdentificationTypeId;
            var uriParameters = new GoodIdentificationTypeUriParameters();

            uriParameters.Id = idObj;

            var req = new GoodIdentificationTypePutRequest(uriParameters, (CreateGoodIdentificationTypeDto)c);

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

            GoodIdentificationTypeProxyUtils.ThrowOnHttpResponseError(resp);
        }
        public HttpResponseMessage Post([FromBody] CreateGoodIdentificationTypeDto value)
        {
            try {
                if (value.GoodIdentificationTypeId == default(string))
                {
                    throw DomainError.Named("nullId", "Aggregate Id in cmd is null, aggregate name: {0}.", "GoodIdentificationType");
                }
                _goodIdentificationTypeApplicationService.When(value as ICreateGoodIdentificationType);
                var idObj = value.GoodIdentificationTypeId;

                return(Request.CreateResponse <string>(HttpStatusCode.Created, idObj));
            } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }
 public void When(CreateGoodIdentificationTypeDto c)
 {
     WhenAsync(c).GetAwaiter().GetResult();
 }