public async Task<IActionResult> Create([Bind("Id,Name,UserName,Password")] User user) { if (ModelState.IsValid) { user.AdditionDate = DateTime.Now; _context.Add(user); await _context.SaveChangesAsync(); return RedirectToAction(nameof(Login)); } return View(user); }
public async Task AddTrackAsync(Models.Track track) { await _context.Tracks.AddAsync(track); await _context.SaveChangesAsync(); }
public async Task AddPlaylistAsync(PlayList playList) { _context.Add(playList); await _context.SaveChangesAsync(); }
public async Task AddAsync(Models.TrackPlayList trackPlayList) { await _context.AddAsync(trackPlayList); await _context.SaveChangesAsync(); }
public async Task AddUserPlayListAsync(Models.UserPlayList userPlayList) { _context.Add(userPlayList); await _context.SaveChangesAsync(); }