public ActionResult Edit(int id)
{
PostModel post = _posty.PobierzPost(id);
TagModel tagi = _tagi.PobierzTagPosta(post.Id);
if (post == null)
return RedirectToAction("Index", "Home");//no such post
else
{
if (tagi == null)
tagi = new TagModel { IdPosta = id, Desc = "", Keywords = "" };
ViewData["post"] = post;
ViewData["tagi"] = tagi;
}
return View();
}