ADO.NET Provider for Highrise

Build 24.0.9060

Model-First Approach

This section describes how to use the Entity Data Model wizard to create the .edmx file and execute queries.

Install and Set Up Entity Framework

Install Entity Framework or add references to the required assemblies for your chosen version of Entity Framework. The assemblies are located in the lib subfolder of the installation directory. See Using EF 6 for using Entity Framework 6 (EF6). See Installed Assemblies for more information about all assemblies shipped with the provider

Add a Data Connection in Server Explorer

Before you can create an Entity Data Model, you will need to create a data connection. To do this,

  1. Navigate to Server Explorer -> right click "Data Connections" -> Add Connection...
  2. Click the Change button beside the Data Source box.
  3. Select CData Highrise Data Source, then click OK.
  4. Configure your connection settings, then click OK.

Add a New Item To Your Project

In the Visual Studio Solution Explorer, right-click your project and click Add > New Item.

Create an ADO.NET Entity Data Model

In the resulting Add New Item dialog, click ADO.NET Entity Data Model and enter an appropriate title, such as "HighriseEntityDataModel.edmx".

Use the Entity Data Model Wizard

Complete the following steps to create the .edmx file with the Entity Data Model wizard:

  1. On the first page, select Generate from database.
  2. On the next page, select the data provider connection you want to use with your project or create a new connection.
  3. Select whether to include sensitive data (such as passwords) in the connection string. Note that the option to exclude sensitive data means password fields are not copied to the generated config file with the rest of the connection string properties.
  4. Select the box to save the entity connection settings in App.Config, and enter a name for the context class of the data connection; for example, "HighriseEntities".

After Visual Studio retrieves the necessary information from the live data source, the wizard presents a listing of database objects you can include in your project. Note that this step may take several minutes as Visual Studio retrieves table schemas from Highrise.

Perform LINQ Commands in Your Code

You are now ready to start using LINQ in your code.

C#

HighriseEntities context = new HighriseEntities();
var PeopleQuery = from People in context.People
                   orderby People.Firstname
                   select People;

VB.NET

Dim context As HighriseEntities = New HighriseEntities()
Dim PeopleQuery = From People In context.People 
					Order By People.Firstname
					Select People

Note: Be sure to declare (c#)"using System.Linq"/(VB.Net)"Imports System.Linq" in your file.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060