EF 4.1 code first causes weird (login) runtime errors
问题 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 repository (using also repository pattern) MyRepsitory.Get(whereClause) i'm getting this error: Cannot open database "MyDatabase" requested by the login. The login failed. Login failed for user 'sa'. OK! So i tried to find what it is caused by and did the following: set a break point at the line which caused the error and as