/// <returns>A task that represents the asynchronous operation</returns> public virtual async Task <IActionResult> ResourceDelete(int id) { if (!await _permissionService.AuthorizeAsync(StandardPermissionProvider.ManageLanguages)) { return(AccessDeniedView()); } //try to get a locale resource with the specified id var resource = await _localizationService.GetLocaleStringResourceByIdAsync(id) ?? throw new ArgumentException("No resource found with the specified id", nameof(id)); await _localizationService.DeleteLocaleStringResourceAsync(resource); return(new NullJsonResult()); }