How to: Add a Table to the LightSwitch Internal Database
For the latest documentation on Visual Studio 2017, see Visual Studio 2017 Documentation.
You can add tables to the LightSwitch internal database. Conversely, you cannot add tables or other abstractions to external data sources such as a SQL Server database, SharePoint list, or WCF RIA Service by using LightSwitch. For those data sources, LightSwitch generates entities that match the structure of the data source.
For more information, see Data: The Information Behind Your Application.
For a related video demonstration, see How Do I: Define My Data in a LightSwitch Application?.
To add a table to the LightSwitch Internal Database
In Solution Explorer, click the Data Sources node.
On the Project menu, click Add Table.
A new table is opened in the data designer.
In Solution Explorer, LightSwitch creates a node that represents the LightSwitch internal database. By default, the name of the node is ApplicationData. The following illustration shows the ApplicationData node in Solution Explorer.
In the Data Designer, at the top of the new table, double-click the name of the table, and then type a new name.
Define the fields of the table. For more information, How to: Define Data Fields.
Data: The Information Behind Your Application
How to: Define Data Fields
How to: Connect to Data
How to: Add a Computed Field
How to: Create a List of Values for a Field
How to: Define Data Relationships
How to: Validate Data