It works:
SqlCeConnectionFactory sqlCeConnection = new SqlCeConnectionFactory("System.Data.SqlServerCe.4.0", "", "Max Database Size=4000;Persist Security Info=False;"); DbDatabase.DefaultConnectionFactory = sqlCeConnection; DbDatabase.SetInitializer(new SampleData());
If the third parameter is the connection string, and you change the Max Database Size parameter, otherwise it defaults to 256 MB.
source share