public async Task TearDown() { await _checkoutAttributeService.DeleteCheckoutAttributeValueAsync(_cav11); await _checkoutAttributeService.DeleteCheckoutAttributeValueAsync(_cav12); await _checkoutAttributeService.DeleteCheckoutAttributeAsync(_ca1); await _checkoutAttributeService.DeleteCheckoutAttributeValueAsync(_cav21); await _checkoutAttributeService.DeleteCheckoutAttributeValueAsync(_cav22); await _checkoutAttributeService.DeleteCheckoutAttributeAsync(_ca2); await _checkoutAttributeService.DeleteCheckoutAttributeAsync(_ca3); }
public virtual async Task <IActionResult> ValueDelete(int id) { if (!await _permissionService.AuthorizeAsync(StandardPermissionProvider.ManageAttributes)) { return(AccessDeniedView()); } //try to get a checkout attribute value with the specified id var checkoutAttributeValue = await _checkoutAttributeService.GetCheckoutAttributeValueByIdAsync(id) ?? throw new ArgumentException("No checkout attribute value found with the specified id", nameof(id)); await _checkoutAttributeService.DeleteCheckoutAttributeValueAsync(checkoutAttributeValue); return(new NullJsonResult()); }