To create the data entity, follow these steps:
- Before we start, we need to check that the table we are going to use has a natural key. We can either configure an alternate key, or simply choose a single key unique index as the table's primary key. Open the designer for the ConVMSVehicleTable table, and check that the Primary Key property is set to VehicleIdx.
- In the project, add a new item. Within the Add New Item dialog, select Data Model from the left-hand list, and then Data Entity from the right.
- Enter ConVMSVehicleTableEntity as Name and press Add.
- We will then get a Data Entity Wizard dialog and select ConVMSVehicleTable in the Primary datasource drop-down list.