public ActionResult Index() { var drzavaServis = new DrzavaServis(); var model = new DrzaveIndexVM(); model.listaDrzava = drzavaServis.DobaviSveDrzave(); return(View(model)); }
// GET: DrzaveController public ActionResult Index() { DrzaveIndexVM model = new DrzaveIndexVM() { Rows = _context.Drzava.Select(x => new DrzaveIndexVM.Row() { DrzavaId = x.DrzavaId, Naziv = x.Naziv }).ToList() }; return(View(model)); }