public async Task <IActionResult> Create([Bind("ID,Pocetak,Opis,KantonOgranicenje,Status")] Izbor izbor) { if (ModelState.IsValid) { _context.Add(izbor); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(izbor)); }
public async Task <IActionResult> Create([Bind("ID,MaxOdabir,BrojGlasova,Opis,IzborId")] GlasackiListic glasackiListic) { if (ModelState.IsValid) { _context.Add(glasackiListic); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["IzborId"] = new SelectList(_context.Izbor, "ID", "Opis", glasackiListic.IzborId); return(View(glasackiListic)); }