public void UpdateSongGenre(int id, SongGenre updatedSongGenre) { var songGenre = SongGenres.SingleOrDefault(x => x.Id == id); if (songGenre != null) { songGenre.Name = updatedSongGenre.Name; } this.SaveChanges(); }
public void DeleteSongGenre(int id) { var songGenre = SongGenres.SingleOrDefault(x => x.Id == id); if (songGenre != null) { SongGenres.Remove(songGenre); } this.SaveChanges(); }