Creating a Model
The Entity Framework creates a model of your data in Visual Studio.
*Note: Developing with the ADO.NET Entity Framework requires that you use Microsoft .NET Framework Version 3.5 SP1 or 4.0 or 4.5 and Visual Studio 2008 SP1 or higher with the Pervasive PSQL Version 4.1 ADO.NET Entity Framework data provider.
The following procedure assumes that you already have the database schema available.
1
2
3
Select ADO.NET Entity Data Model; then, click Add.
Add New Item window. ADO.NET Entity Data Model is selected.
4
The Entity Data Model Wizard appears. Select Generate from database; then, click Next.Entity Data Model Wizard, on the Choose Model Contents window
5
Click New Connection... to create a new connection. If you have an established connection, you can select it during this step.
a.
On the Choose Data Source window, select Other in the Data source list; then, select ADO.NET Pervasive PSQL Provider in the Data provider drop-down list.
b.
Click Continue.
c.
6
a.
If the radio buttons are selectable, select Yes, include the sensitive data in the connection string to include the sensitive data in the connection string.
b.
In the Save entity connection settings... field, type a name for the name of the main data access class or accept the default.
c.
Click Next.
Entity Data Model wizard, on the Choose Your Data Connection screen
7
Entity Data Model Wizard, on the Choose Your Database Objects window
8
Click Finish. The model is generated and opened in the Model Browser.
Model of the selected objects shown in the Model Browser