private DeleteComment ( int id, int idPost ) : System.Web.Mvc.ActionResult | ||
id | int | |
idPost | int | |
Résultat | System.Web.Mvc.ActionResult |
public ActionResult DeleteComment(int id, int idPost)
{
try
{
_komentarze.UsunKomentarz(id);
return RedirectToAction("Details", "Post", new { id = idPost });
}
catch
{
return RedirectToAction("Details","Post",new{id=idPost});
}
}