public async Task <IActionResult> Create([Bind("Id,Film,Izašao")] Vani vani) { if (ModelState.IsValid) { _context.Add(vani); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(vani)); }
public async Task <IActionResult> Create([Bind("Id,Filmskižanr")] Žanr žanr) { if (ModelState.IsValid) { _context.Add(žanr); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(žanr)); }
public async Task <IActionResult> Create([Bind("Id,film,Redatelj,Jezik,Opis,ŽanrId")] Film filmovi) { if (ModelState.IsValid) { _context.Add(filmovi); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["ŽanrId"] = new SelectList(_context.Žanr, "Id", "Filmskižanr", filmovi.ŽanrId); return(View(filmovi)); }