Here we will see how to create tables as well as establish relationships among tables in LightSwitch using Visual Studio 2012.
Here we will see how to create tables as well as establish relationships among tables in LightSwitch using Visual Studio 2012.This article describes how to establish a relationship among tables.
Step 1Open the Solution Explorer.Step 2In the Solution Explorer, right-click on the Server and choose "Add Table". Step 3Here we will add three tables.Company TableEmployee TableProject TableStep 4Now we are going to add a relationship among the tables.To add relationships among the tables, go to the menu bar and click on the "Add Relationship" button.The Add New Relationship dialog box appears. In that, establish the relationship in such a way that one Company can have more than one Employee.One Employee can have more than one project.Step 5In the Solution Explorer, right-click on the Screens and choose Add Screen.The Add New Screen dialog box appears. Select the "Editable Grid Screen" from the Screen Template, under screen information, choose "Company" under screen data and provide a name to the Screen and click the "OK" button.In this way we will add two more Editable Grid Screens, one for Employee and another one for the project.The Editable Project Screen is shown below.Step 6Press F5 to run the application. The output for the Editable Employee Grid:The output for the Editable project Grid is shown below.
Printing in C# Made Easy