Using sql server compact, and entity framework 4.3 code first.
Global.asax.cs has a:
Database.SetInitializer<DataContext>(new mySeedingClass());
Visual Web Developer 2010 will recreate the database, with appropriate seed data if I delete the .sdf file in windows and have my seeding class inherit from CreateDatabaseIfNotExists or DropCreateDatabaseAlways (have rechecked multiple times with current solution), .
VS 2012 works fine if I set the seeding class to inherit from DropCreateDatabaseAlways, but while set to CreateDatabaseIfNotExists, I get the error:
Exception Details: System.Data.SqlServerCe.SqlCeException: The database file cannot be found. Check the path to the database.
rather than recreating the database (as is reliably done in VWD 2010). When in debug mode, the Seeding Class constructor does not seem to be called at all if the database has been deleted and the class inherits from CreateDatabaseIfNotExists
Global.asax.cs has a:
Database.SetInitializer<DataContext>(new mySeedingClass());
Visual Web Developer 2010 will recreate the database, with appropriate seed data if I delete the .sdf file in windows and have my seeding class inherit from CreateDatabaseIfNotExists or DropCreateDatabaseAlways (have rechecked multiple times with current solution), .
VS 2012 works fine if I set the seeding class to inherit from DropCreateDatabaseAlways, but while set to CreateDatabaseIfNotExists, I get the error:
Exception Details: System.Data.SqlServerCe.SqlCeException: The database file cannot be found. Check the path to the database.
rather than recreating the database (as is reliably done in VWD 2010). When in debug mode, the Seeding Class constructor does not seem to be called at all if the database has been deleted and the class inherits from CreateDatabaseIfNotExists