Here we will see how to establish relationships between tables in LightSwitch Applications (Visual C#) in Visual Studio 2012.
The following is the procedure for establishing a relationship between tables.
Step 1Open the Solution Explorer.Step 2In the Solution Explorer, right-click on the Server and choose "Add Table".Step 3The table appears.Employee TableItem TableStep 4Go to the menu bar and click on the "Add Relationship" button.The relationship dialog box appears on the screen.Step 5There are various types of relationships; they are:1. One to Many2. Zero or One to One3. Many to OneStep 6Establishing a one to many relationship between tables.The relationship between two tables is as in the following:Step 7Establishing a many to one relationship between tables.The relationship between two tables is as in the following:Step 8Establishing one to one relationship between tables.The relationship shown between two tables is not supported in LightSwitch 2012.Step 9Establishing a zero or one to one relationship between tables.The relationship between two tables is as in the following:
Printing in C# Made Easy