示例#1
0
        public void Update(int id, PlaylistArtist t)
        {
            var playlistArtist = _context.PlaylistArtists.Include(tr => tr.Tracks).FirstOrDefault(art => art.PlaylistArtistId == id);

            playlistArtist.ImgUri           = t.ImgUri;
            playlistArtist.Name             = t.Name;
            playlistArtist.PlaylistArtistId = t.PlaylistArtistId;
            playlistArtist.Tracks           = t.Tracks;
            playlistArtist.Uri = t.Uri;

            _context.PlaylistArtists.Update(playlistArtist);
        }
示例#2
0
 public void Delete(PlaylistArtist t)
 {
     _context.PlaylistArtists.Remove(t);
 }
示例#3
0
 public void Add(PlaylistArtist t)
 {
     _context.PlaylistArtists.Add(t);
 }