public async Task <IActionResult> Edit(short id, [Bind("Film_id,Title,Description")] Film_text film_text) { if (id != film_text.Film_id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(film_text); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Film_textExists(film_text.Film_id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(film_text)); }
public async Task <IActionResult> Create([Bind("Film_id,Title,Description")] Film_text film_text) { if (ModelState.IsValid) { _context.Add(film_text); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(film_text)); }