While running a unit test method that tests the Controller action method that access the database, we get following error.The model backing the '' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269). Solution
The solution of this problem is to add following line into the constructor of DbContext classSystem.Data.Entity.Database.SetInitializer<Models.MyContext>(null);
So the typical DbContext code looks like below
Hope this helps.