I am trying to configure a different location for my local db.
I read an article on configuring connection strings and it suggests I can replace |DataDirectory| in the web config with ~/MyDirectory where ~ is the web app root. So I have input the connection string as:
<connectionStrings>
<add name="Context" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=Context-20130829161219;Integrated Security=SSPI;AttachDBFilename=~/MyDirectory/Context-20130829161219.mdf"
providerName="System.Data.SqlClient" />
Unfortunately, when I run the app it doesn't seem to create the db at all. I can imagine it's only something very small that I am doing wrong but I would appreciate if someone can point me in the right direction.
Many Thanks