all
I am trying to change the connection string at runtime, i am using CTP5,
when i change the connection string and the folder is empty EF throws:
Database ‘C:…\bin\Debug\db.mdf’ already exists. Choose a different database name.
Cannot attach the file ‘C:…\bin\Debug\DB\db.mdf’ as database ‘DB’.
when the folder has db.ldf (The Log File) and db.mdf EF throws the same exception
Please Help…
In Entity Framework 4 you can create an ObjectContext with a connection string as constructor argument. So you’re free to use any connection string any time. If course it would help if the database structure matched the context :).