Example #1
0
        public void UpdateSongGenre(int id, SongGenre updatedSongGenre)
        {
            var songGenre = SongGenres.SingleOrDefault(x => x.Id == id);

            if (songGenre != null)
            {
                songGenre.Name = updatedSongGenre.Name;
            }
            this.SaveChanges();
        }
Example #2
0
        public void DeleteSongGenre(int id)
        {
            var songGenre = SongGenres.SingleOrDefault(x => x.Id == id);

            if (songGenre != null)
            {
                SongGenres.Remove(songGenre);
            }
            this.SaveChanges();
        }