Change SQL Server Express LocalDB Database Structure in Visual Studio Project

336 Views Asked by At

I have a VS2013 project (WPF, C#), that has a .mdf database file that I use for the application. I'm using SQL Server 2012 Express LocalDB. I'm using Entity Framework 6.

I created the DB in the project by Add New Item -> Service-based Database.

I then added my tables with the appropriate columns, relationships and so forth.

I then added Add New Item -> ADO.NET Entity Data Model -> EF Designer from database, obviously selecting the database I created above.

Everything works great. So I deploy me application to end users using Flexera InstallShield.

Everything works.

So here is the question. If I make a structural change to the database (e.g. add a column to a table, or add a new table), how do I get this database change down to the end users database, that have already installed my application, without deleting or stepping on their existing data?

Thank you in advance.

0

There are 0 best solutions below