Exemple #1
0
        public ActionResult Index()
        {
            var drzavaServis = new DrzavaServis();

            var model = new DrzaveIndexVM();

            model.listaDrzava = drzavaServis.DobaviSveDrzave();

            return(View(model));
        }
Exemple #2
0
        // 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));
        }