Exemple #1
0
 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);
 }
Exemple #2
0
        public async Task AddTrackAsync(Models.Track track)
        {
            await _context.Tracks.AddAsync(track);

            await _context.SaveChangesAsync();
        }
Exemple #3
0
 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();
 }