I\'m using EF 4.1 code first. Running into a very weird situation: Database does not exist, code is executed and as soon as the code wants to execute a query against the reposit
For the sake of future use: it turns out that EF 4.1 was not the source of my problems!
As i stated above (after the EDIT) it is possible to run the (UNCHANGED) code in a new project and it will execute as expected!
It is also true that i successfully created a new project, referenced the model and the DAL (repositories, etc) of the original project and the new code in the new project executed as expected.
This lead me to think that this is a Visual Studio 2010 Solution(or Project)-based problem. I cannot remember having done anything weird to this solution (the only thing i did was adding a test-project, which i afterward deleted, and also some - i think three files - related to this project test-project - IS THIS WEIRD?!).
The only solution i could think of, was to create a new Visual Studio 2010 Solution from scratch and place the original Projects in the solution tree...and it worked!