public async Task <IActionResult> Create([Bind("PlaylistId,Name,IsPrivate,UserName")] Playlist playlist) { if (ModelState.IsValid) { _context.Add(playlist); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(playlist)); }
public async Task <IActionResult> Create([Bind("SongId,Author,Title,Genre,ReleaseDate")] Song song) { if (ModelState.IsValid) { _context.Add(song); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(song)); }