public MusicTrack RemoveMusic(int id) { MusicTrack musicTrack = Context.MusicTracks.Find(id); if (musicTrack != null) { Context.MusicTracks.Remove(musicTrack); Context.SaveChanges(); } return(musicTrack); }
public MusicTrack Add(MusicTrack musicTrack) { Context.MusicTracks.Add(musicTrack); Context.SaveChanges(); return(musicTrack); }