diff --git a/src/MusicStore/Models/MusicStoreContext.cs b/src/MusicStore/Models/MusicStoreContext.cs index 5eaa43da36..72822703bd 100644 --- a/src/MusicStore/Models/MusicStoreContext.cs +++ b/src/MusicStore/Models/MusicStoreContext.cs @@ -26,8 +26,8 @@ namespace MusicStore.Models builder.Entity().Key(o => o.OrderDetailId); // TODO: Remove this when we start using auto generated values - builder.Entity().Property(a => a.ArtistId).GenerateValueOnAdd(generateValue: false); - builder.Entity().Property(g => g.GenreId).GenerateValueOnAdd(generateValue: false); + builder.Entity().Property(a => a.ArtistId).GenerateValueOnAdd(generateValue: false).ForSqlServer(b => b.UseNoValueGeneration()); + builder.Entity().Property(g => g.GenreId).GenerateValueOnAdd(generateValue: false).ForSqlServer(b => b.UseNoValueGeneration()); //Deleting an album fails with this relation builder.Entity().Ignore(a => a.OrderDetails);