diff --git a/src/MusicStore/Models/MusicStoreContext.cs b/src/MusicStore/Models/MusicStoreContext.cs index 58a6ec2281..63e5e05f67 100644 --- a/src/MusicStore/Models/MusicStoreContext.cs +++ b/src/MusicStore/Models/MusicStoreContext.cs @@ -33,7 +33,9 @@ namespace MusicStore.Models builder.Entity().ManyToOne(a => a.Artist); builder.Entity().ManyToOne(a => a.Genre, g => g.Albums); builder.Entity().OneToMany(o => o.OrderDetails); - builder.Entity().OneToMany(a => a.OrderDetails, od => od.Album); + + //Deleting an album fails with this relation + //builder.Entity().OneToMany(a => a.OrderDetails, od => od.Album); base.OnModelCreating(builder); }