I have MDF file which i use as DB and connecting to it using Linq-to-SQL.
my connection string is:
<add name="TasteTeam.Properties.Settings.TasteDBConnectionString" connectionString="Data Source=(LocalDB)\v11.0; AttachDbFilename=|DataDirectory|\TasteDB.mdf;Integrated Security=True" providerName="System.Data.SqlClient" />
my problem is that when i run the program and adds data to a table it adds into the MDF file that in the bin folder instead of the main MDF file.
this situation causes the MDF file to be empty every time i restart myprogram instead of persisting the data.
what can i do to make both MDF and the tmp MDF file in the bin be the same file (i already tried all the "copy to output directory" options but nothing seem to help)