예제 #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);
 }
예제 #2
0
 public void AddPlaylist(PlayList playList)
 {
     _context.Add(playList);
     _context.SaveChanges();
 }
예제 #3
0
 public void AddUserPlayList(Models.UserPlayList userPlayList)
 {
     _context.Add(userPlayList);
     _context.SaveChanges();
 }