I have a WPF application. My question is What should be the build action for the database in my case. I have a database but every time I build my solution the database entries are removed and a new database is created. What build action should I keep for my database to overcome this problem.
How come you remove all of your Database data? What happens to your data then? Is it possible in a live system?
To overcome this problem, you should keep track of your DB changes as DB scripts. This means that by any DB change, you should keep its relevant script somewhere in your source control. The scripts should be traceable. This means that if you want to migrate from release A to release D, you should know which scripts should be executed for the DB migration.
Here is the solution we use in our project.