From 17e5811a9790c5671e5bbb2110618b2e00476765 Mon Sep 17 00:00:00 2001 From: Brice Lambson Date: Wed, 3 Dec 2014 14:40:17 -0800 Subject: [PATCH] React to a change in EntityFramework.Migrations --- .../DatabaseErrorPageMiddleware.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageMiddleware.cs b/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageMiddleware.cs index 308d9cd8c8..bc32702c55 100644 --- a/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageMiddleware.cs +++ b/src/Microsoft.AspNet.Diagnostics.Entity/DatabaseErrorPageMiddleware.cs @@ -89,10 +89,10 @@ namespace Microsoft.AspNet.Diagnostics.Entity var pendingMigrations = migrator.GetPendingMigrations().Select(m => m.GetMigrationId()); var pendingModelChanges = true; - var snapshot = migrator.MigrationAssembly.Model; + var snapshot = migrator.MigrationAssembly.ModelSnapshot; if (snapshot != null) { - pendingModelChanges = migrator.ModelDiffer.Diff(snapshot, dbContext.Model).Any(); + pendingModelChanges = migrator.ModelDiffer.Diff(snapshot.Model, dbContext.Model).Any(); } if ((!databaseExists && pendingMigrations.Any()) || pendingMigrations.Any() || pendingModelChanges)