public ActionResult Index() { var prod = db.Stavkes.ToList(); var prod1 = db.Stavkes.ToList(); var viewModel1 = new Stavke1 { Stavken = prod, Stavken1 = prod1, }; return(View(viewModel1)); }
public ActionResult Edit(int Id) { var e = db.Stavkes.SingleOrDefault(p => p.Redni_broj == Id); if (e == null) { return(HttpNotFound()); } var viewModel1 = new Stavke1 { Stavke = e }; return(View("Index", viewModel1)); }