// GET: Platforma public ActionResult Platforma() { { DataKnihovna.DAO.PlatformaDao platformaDao = new DataKnihovna.DAO.PlatformaDao(); IList <DataKnihovna.Model.Platforma> platformy = platformaDao.GetlAll(); return(View(platformy)); } }
public ActionResult Add(Platforma platforma) { DataKnihovna.DAO.PlatformaDao platformaDao = new DataKnihovna.DAO.PlatformaDao(); platforma.Pocet = 0; if (ModelState.IsValid) { platformaDao.Create(platforma); return(RedirectToAction("Platforma")); } else { return(View("NovaPlatforma", platforma)); } }