I am learning EF.I have some classes of model and class that inherited from DbContext.
I have intializer Initializer : DropCreateDatabaseIfModelChanges with empty method
Seed.I call
Database.SetInitializer<...Context>(new ...Initializer());
And I have set new add to connection strings
<add name="...Context" connectionString="Data Source=|DataDirectory|Temp.sdf" providerName="System.Data.SqlServerCe.4.0"/>
but I can’t generate DB from this.App Data is empty.
Please help me!Probably I forgot something?My method Seed I have left is empty but I don’t think it’s a trouble
Thank u!
Setting a initializer is not enough. You need at least start a query.
In the moment you try to get data from your context, the process will start and if your database
does not exists the will get created.