C# Express Edition + SQL Server 2008 R2 Express; Database file being recreated on run -


A standard C # console application has been created in the Express of 2010; Project Wires, used to create wallets using a simple SQL Express DB file, used magicians to create an entity data model based on the newly created DB, unit Write some lines to test

The problem is that whenever I run the application, whatever DER DEE is overwriting itself and completely ignoring the original DB file sitting in the project diary.

Do anyone know what I am missing?

This is not entirely certain about this but try it out.

  1. Make sure your connection string indicates the database file Project Directory
  2. Select the file in Visual Studio and select 'Copy to Output Directory' - & gt; & Gt; Do not copy.

    Hope this works.

Comments