I found a problem. These tutorials do not contain information about some of the vital settings that I need to get to work.
1) Your application should have App.config containing a connection string with a name with the same name as your class inherited from DbContext. In my case, "TestEF_CF.ProductContext".
2) The database cannot be created before you start using it. Just set the start directory to the name you want to create the Entity Framework when it automatically creates the database.
As soon as I did this, it worked correctly. I got one more step, but got an exception when I tried to save the database. When EF automatically created the database, everything worked fine.
One thing that may have made it more problematic for my development environment may be that I cannot directly use local mdf files. However, this does not hurt if the EF team can share these details more openly than now, it will save me (or us) from disappointment.
Atle s
source share