I\'m trying to use EF Code First with my WPF application , the idea is to create a SqlCe Db in AppData/MyApp (if there isn\'t one) and use it with EF Code First.
At the
Here is a possible clue. If you were to install EFCodeFirst.SqlServerCompact using NuGet Package manager, and look in: Visual Studio 2010\Projects\MyProject\packages\EFCodeFirst.SqlServerCompact.0.8.8482\Content, it does things for your web app like:
public static class AppStart_SQLCEEntityFramework {
public static void Start() {
DbDatabase.DefaultConnectionFactory = new SqlCeConnectionFactory("System.Data.SqlServerCe.4.0");
// Sets the default database initialization code for working with Sql Server Compact databases
// Uncomment this line and replace CONTEXT_NAME with the name of your DbContext if you are
// using your DbContext to create and manage your database
//DbDatabase.SetInitializer(new CreateCeDatabaseIfNotExists());
}
}