HTML and CSS Reference
In-Depth Information
■
If the
State
table is not shown, right-click the Tables node and select the Refresh link.
Tip
3.
Drag the
State
table from the Server Explorer onto the object Relational Designer
pane. This will define the
State.dbml
class as shown in Figure
9-12
.
Figure 9-12.
The State.dbml design
4.
You now have a model that you can use to provide the state details for the map.
Press F6 to rebuild the project. This will make the model available for linking to
a view.
Creating the Map View
With a model already defined, you'll now create the view that will display the model elements.
eXerCISe 9-6 CreatING the Map VIeW
1.
Right-click the Views\Home folder and select the Add ➤ View links.
2.
In the Add View dialog box, enter the name
Map
. Select the “Create a strongly-
typed view” checkbox and select the
State
class in the Model class dropdown
list. Unselect the other check boxes and select the list template as shown in
Figure
9-13
.