I am just getting my feet wet using Entity Framework 4.3 and Migrations for a SQLServerCompact 4.0 database, so I am using the simplest possible methods to get things started. Following the advice in this blog I added the initialization statements below to the Main method of a console application. This all works very well.
Database.DefaultConnectionFactory = New SqlCeConnectionFactory("System.Data.SqlServerCe.4.0")
Database.SetInitializer(Of MySQLCompactDbContext)(New MySQLCompactDBInitializer)
But in production the code addressing the database will be located in a class library that will be accessed through COM-interop from a Visual Basic 6 application. So there is no natural entry point for the code where to put the static methods mentioned above.
Where can I put them? Please point out the alternative way using the config file if necessary.