Share via


How to: Add a Table to the LightSwitch Internal Database

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.

link to video 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

  1. In Solution Explorer, click the Data Sources node.

  2. 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.

    Intrinsic database

  3. In the Data Designer, at the top of the new table, double-click the name of the table, and then type a new name.

  4. Define the fields of the table. For more information, How to: Define Data Fields in a LightSwitch Database.

See Also

Tasks

How to: Define Data Fields in a LightSwitch Database

How to: Connect to Data

How to: Add a Computed Field in a LightSwitch Database

How to: Create a List of Values for a Field in a LightSwitch Application

How to: Define Data Relationships in LightSwitch

How to: Validate Data in a LightSwitch Application

Other Resources

Data: The Information Behind Your Application