public async Task <IActionResult> OnPostDeleteAsync(bool permanent) { await _productCommands.Delete(Product.Id, !permanent); return(RedirectToPage("./EditCategory", new { id = Product.CategoryId })); }