public ActionResult Edit(Toy toy) { if (ModelState.IsValid) { repository.SaveToy(toy); TempData["message"] = string.Format("Zapisano {0}", toy.Name); return(RedirectToAction("Index")); } else { return(View(toy)); } }