![]() |
VOOZH | about |
This article illustrates using LINQ to access tables within the Cvent via the CData ADO.NET Data Provider for Cvent. To achieve this, we will use LINQ to Entity Framework, which facilitates the generation of connections and can be seamlessly employed with any CData ADO.NET Data Providers to access data through LINQ.
See the help documentation for a guide to setting up an EF 6 project to use the provider.
Enter your data source connection information.
Before you can authenticate to Cvent, you must create a workspace and an OAuth application.
To create a workspace:
| event/attendees:read | event/attendees:write | event/contacts:read |
| event/contacts:write | event/custom-fields:read | event/custom-fields:write |
| event/events:read | event/events:write | event/sessions:delete |
| event/sessions:read | event/sessions:write | event/speakers:delete |
| event/speakers:read | event/speakers:write | budget/budget-items:read |
| budget/budget-items:write | exhibitor/exhibitors:read | exhibitor/exhibitors:write |
| survey/surveys:read | survey/surveys:write |
After you have set up a Workspace and invited them, developers can sign up and create a custom OAuth app. See the Creating a Custom OAuth Application section in the Help documentation for more information.
After creating an OAuth application, set the following connection properties to connect to Cvent:
Below is a typical connection string:
OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;InitiateOAuth=GETANDREFRESH;
Using the entity you created, you can now perform select , update, delete, and insert commands. For example:
CventEntities context = new CventEntities();
var eventsQuery = from events in context.Events
select events;
foreach (var result in eventsQuery) {
Console.WriteLine("{0} {1} ", result.Id, result.Id);
}
See "LINQ and Entity Framework" chapter in the help documentation for example queries of the supported LINQ.
Download a free trial of the Cvent Data Provider to get started:
Download NowLearn more:
👁 Cvent IconRapidly create and deploy powerful .NET applications that integrate with Cvent.