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); }
public void Delete(PlaylistArtist t) { _context.PlaylistArtists.Remove(t); }
public void Add(PlaylistArtist t) { _context.PlaylistArtists.Add(t); }