/// <returns>A task that represents the asynchronous operation</returns> public virtual async Task <IActionResult> PredefinedProductAttributeValueDelete(int id) { if (!await _permissionService.AuthorizeAsync(StandardPermissionProvider.ManageAttributes)) { return(AccessDeniedView()); } //try to get a predefined product attribute value with the specified id var productAttributeValue = await _productAttributeService.GetPredefinedProductAttributeValueByIdAsync(id) ?? throw new ArgumentException("No predefined product attribute value found with the specified id", nameof(id)); await _productAttributeService.DeletePredefinedProductAttributeValueAsync(productAttributeValue); return(new NullJsonResult()); }