How to: Add a Database Project to a LightSwitch Application
If you add a database project to your LightSwitch solution, you can write scripts that update the intrinsic database for your application when you build or deploy it. For example, you can populate a table with data when you deploy the application or change the schema of a database that you've already deployed.
To add a database project
In Solution Explorer, open the shortcut menu for the Solution node, choose Add, and then choose New Project.
In the Add New Project dialog box, choose the SQL Server node.
In the project list, choose SQL Server Database Project.
In the Name text box, enter a name for the project, and then choose the OK button.
To associate a database project
In Solution Explorer, expand the LightSwitch Application node, open the shortcut menu for the Properties node, and then choose Open.
On the General Properties tab, in the SQL Database Project list, choose the database project.
You might need to wait while LightSwitch creates the associations.