public IActionResult OnPost() { try { _ingredientService.Delete(recipe_Ingredient.id); } catch (InvalidOperationException) { goto NoInredients; } NoInredients: try { _typeService.Delete(recipe_Type.id); } catch (InvalidOperationException) { goto NoTypes; } NoTypes: _service.Delete(recipe.id); //_ingredientService.Delete(recipe_Ingredient.id); //_typeService.Delete(recipe_Type.id); return(Redirect(Url.Page("/Index", new { login = user.Login }))); }