Hello. Created a console application. Using code first. Copied from data source database:
Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=D:\ConsoleApplication1\ConsoleApplication1\MyDb.mdf;Integrated Security=True Created models, made migrations. I decided to find how to make the path in the line universal. What would the project was not tied to a particular place. I found such an option, or rather just in windows forms, added a grid to a form, and started adding a date set to it, and he generated this line, and I copied it from there:
<add name="MyConnection" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\MyDb.mdf;Integrated Security=True" providerName="System.Data.SqlClient"/> I do the migration, I update the database, but it was not there. With such a connection string, the table is not updated. What am I doing not so please tell me, already broke my whole head with this connection string.
|DataDirectory|\MyDb.mdfindicates which database? What specific file? - tym32167