private bool HasAnySongs()
 {
     using (MusicLibraryContext dbContext = new MusicLibraryContext())
     {
         return(dbContext
                .Entry(this.data)
                .Collection(album => album.Songs)
                .Query()
                .Any());
     }
 }
Esempio n. 2
0
 public void Update(T obj)
 {
     table.Attach(obj);
     _context.Entry(obj).State = EntityState.Modified;
 }