We are proud to share our inclusion in the 2024 Gartner Magic Quadrant for Data Integration Tools. We believe this recognition reflects the differentiated business outcomes CData delivers to our customers.
Get the Report →Connect to Cvent Data from Blazor Apps
Build ASP.NET Core Blazor C# apps that integrate with real-time Cvent data using standard SQL.
Blazor is a framework for developing modern, client-side web UIs using .NET technology. Instead of coding in JavaScript, developers can use the familiar C# language and .NET libraries to build app UIs.
The CData ADO.NET Provider for Cvent can be used with standard ADO.NET interfaces, such as LINQ and Entity Framework, to interact with live Cvent data. Since Blazor supports .NET Core, developers can use CData ADO.NET Providers in Blazor apps. In this article, we will guide you to build a simple Blazor app that talks to Cvent using standard SQL queries.
Install the CData ADO.NET Provider for Cvent
CData ADO.NET Providers allow users to access Cvent just like they would access SQL Server, using simple SQL queries.
Install the Cvent ADO.NET Data Provider from the CData website or from NuGet. Search NuGet for "Cvent ADO.NET Data Provider."

Create a Cvent-Connected Blazor App
Start by creating a Blazor project that references the CData ADO.NET Provider for Cvent
- Create a Blazor project on Visual Studio.
- From the Solution Explorer, right click Dependencies, then click Add Project Reference.
- In the Reference Manager, click the Browse button, and choose the .dll file of the installed ADO.NET Provider (e.g. System.Data.CData.Cvent.dll, typically located at C:\Program Files\CData\CData ADO.NET Provider for Cvent\lib etstandard2.0).


SELECT Cvent Data from the Blazor App
- Open the Index.razor file from the Project page.
- In a CventConnection object, set the connection string:
Before you can authenticate to Cvent, you must create a workspace and an OAuth application.
Creating a Workspace
To create a workspace:
- Sign into Cvent and navigate to App Switcher (the blue button in the upper right corner of the page) >> Admin.
- In the Admin menu, navigate to Integrations >> REST API.
- A new tab launches for Developer Management. Click on Manage API Access in the new tab.
- Create a Workspace and name it. Select the scopes you would like your developers to have access to. Scopes control what data domains the developer can access.
- Choose All to allow developers to choose any scope, and any future scopes added to the REST API.
- Choose Custom to limit the scopes developers can choose for their OAuth apps to selected scopes. To access all tables exposed by the driver, you need to set the following scopes:
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
Creating an OAuth Application
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.
Connecting to Cvent
After creating an OAuth application, set the following connection properties to connect to Cvent:
- InitiateOAuth: GETANDREFRESH. Used to automatically get and refresh the OAuthAccessToken.
- OAuthClientId: The Client ID associated with the OAuth application. You can find this on the Applications page in the Cvent Developer Portal.
- OAuthClientSecret: The Client secret associated with the OAuth application. You can find this on the Applications page in the Cvent Developer Portal.
For example: OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;
- The code below creates a simple Blazor app for displaying Cvent data, using standard SQL to query Cvent just like SQL Server.
@page "/" @using System.Data; @using System.Data.CData.Cvent; <h1>Hello, world!</h1> Welcome to your Data app. <div class="row"> <div class="col-12"> @using (CventConnection connection = new CventConnection( "OAuthClientId=MyOAuthClientId;OAuthClientSecret=MyOAuthClientSecret;")) { var sql = "SELECT Id, Title FROM Events WHERE Virtual = 'true'"; var results = new DataTable(); CventDataAdapter dataAdapter = new CventDataAdapter(sql, connection); dataAdapter.Fill(results); <table class="table table-bordered"> <thead class="thead-light"> <tr> @foreach (DataColumn item in results.Rows[0].Table.Columns) { <th scope="col">@item.ColumnName</th> } </tr> </thead> <tbody> @foreach (DataRow row in results.Rows) { <tr> @foreach (var column in row.ItemArray) { <td>@column.ToString()</td> } </tr> } </tbody> </table> } </div> </div>
- Rebuild and run the project. The ADO.NET Provider renders Cvent data as an HTML table in the Blazor app.
At this point, you have a Cvent-connected Blazor app, capable of working with live Cvent data just like you would work with a SQL Server instance. Download a free, 30-day trial and start working with live Cvent data in your Blazor apps today.