Step 2: Connecting the Data to C1DataSource
In This Topic
In this step, you'll add a C1DataSource component to the form and connect it to the Categories table of the data source.
- Drag a C1DataSource component from the Toolbox onto the form. This is a non-visual component, so it will appear on the tray below the form area rather than on the form itself.
- In the Properties window, set the C1DataSource's ContextType property to the available item in the drop-down list. It should be something similar to AppName.NORTHWNDEntities.
- Click the ellipsis button next to the ViewSourceCollection property to open the EntityViewSourceProperties Collection Editor.
- Click Add and set the EntitySetName property to Categories.
- Click OK to close the editor.
With the database connected to C1DataSource, all you need to do is add a grid to display the data.