public async Task <IActionResult> Create([Bind("Id,Naziv")] Partija partija) { if (ModelState.IsValid) { _context.Add(partija); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(partija)); }
public async Task <IActionResult> Create([Bind("Id,ZvanjaMi,BodoviMi,BodoviVi,ZvanjaVi,PartijaId")] Bela bela) { if (ModelState.IsValid) { _context.Add(bela); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["PartijaId"] = new SelectList(_context.Partija, "Id", "Naziv", bela.PartijaId); return(View(bela)); }