public async Task <IActionResult> OnPostDeleteProductAsync(string productId) { if (await _productApi.DeleteProduct(productId)) { return(RedirectToPage()); } ViewData["productError"] = "Failed to delete product"; return(Page()); }
public async Task <IActionResult> OnPostDeleteProductAsync(string productId) { if (await _productApi.DeleteProduct(productId)) { return(RedirectToPage()); } ViewData["productError"] = "Failed to delete product"; return(Page()); }