public void Patch(string id, [FromBody] MergePatchPhysicalInventoryDto value)
 {
     try {
         PhysicalInventoriesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
         _physicalInventoryApplicationService.When(value as IMergePatchPhysicalInventory);
     } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
 }
        public void Put(string id, [FromBody] CreateOrMergePatchOrDeletePhysicalInventoryDto value)
        {
            try {
                // ///////////////////////////////
                if (value.Version != default(long))
                {
                    value.CommandType = CommandType.MergePatch;
                    PhysicalInventoriesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                    _physicalInventoryApplicationService.When(value as IMergePatchPhysicalInventory);
                    return;
                }
                // ///////////////////////////////

                PhysicalInventoriesControllerUtils.SetNullIdOrThrowOnInconsistentIds(id, value);
                _physicalInventoryApplicationService.When(value as ICreatePhysicalInventory);
            } catch (Exception ex) { var response = HttpServiceExceptionUtils.GetErrorHttpResponseMessage(ex); throw new HttpResponseException(response); }
        }