public async Task <IActionResult> Create([Bind("Id,Sinopsis,Genre,Image,Rented")] Film film) { if (ModelState.IsValid) { _context.Add(film); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(film)); }
public async Task <IActionResult> Create([Bind("Id,Name,LastName,Email,ProfilePicture")] User user) { if (ModelState.IsValid) { _context.Add(user); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(user)); }
public async Task <IActionResult> Create([Bind("Id,DateRental,DateReturn")] UserFilm userFilm) { if (ModelState.IsValid) { _context.Add(userFilm); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(userFilm)); }