After the update from EF 5.0 to EF 6 Alpha 2, our method for DB checking no longer works.
```
try
{
logger.Info("Check if database migration is required");
var context = new MyContext();
logger.Info("No database migration is required");
}
catch (InvalidOperationException ex)
{
// "The model backing the 'MyContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269)."
if (ex.Message.Contains("The model backing the 'MyContext' context has changed since the database was created."))
{
logger.Info("Redirect all requests because database migration is required!");
ActivateMaintenanceScreenRoute();
}
else
{
throw;
}
}
```
Have you changed anything on the migration needed detection?
```
try
{
logger.Info("Check if database migration is required");
var context = new MyContext();
logger.Info("No database migration is required");
}
catch (InvalidOperationException ex)
{
// "The model backing the 'MyContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269)."
if (ex.Message.Contains("The model backing the 'MyContext' context has changed since the database was created."))
{
logger.Info("Redirect all requests because database migration is required!");
ActivateMaintenanceScreenRoute();
}
else
{
throw;
}
}
```
Have you changed anything on the migration needed detection?