예제 #1
0
        public bool AddSongsToPlayList(AddSongToPlayListRequest request)
        {
            if (request != null)
            {
                UsersPlayList playList = new UsersPlayList();
                playList.SongId     = request.SongId;
                playList.PlayListId = request.PlayListId;
                playList.UserId     = request.UserId;

                _db.UsersPlayLists.Add(playList);
                _db.SaveChanges();
                return(true);
            }
            return(false);
        }
예제 #2
0
 public IActionResult AddSongsToPlayList(AddSongToPlayListRequest data)
 {
     return(Ok(repository.AddSongsToPlayList(data)));
 }