Telerik Data Access provides a brand new LINQ-enabled data source component targeted at RAD developers – the OpenAccessLinqDataSource. The OpenAccessLinqDataSource allows you to connect to any supported relational data store such as a database based on the Telerik Data Access domain model, which can then be consumed by the data-bound UI controls, such as RadControls for ASP.NET Ajax.
Telerik Data Access provides two DataSource controls that support data binding scenarios in Web Applications - OpenAccessLinqDataSource and OpenAccessDataSource.
The OpenAccessLinqDataSource is the new data source, released in Q3 2011. It exposes LINQ to Web developers. The data source is developed exclusively for .NET 4.0 enabling support for all the latest enhancements in asp.net like query extenders and DynamicData support.
The OpenAccessLinqDataSource control is available for Visual Studio 2010 Web Applications or Web Sites that use .NET version 4.
The OpenAccessDataSource control is the old data source.
All topics in this chapter target the new OpenAccessLinqDataSource.
There are two ways to add a new OpenAccessLinqDataSource to a web page:
The most straightforward way is to drag and drop the control from the Toolbox to your web page.
The second way to add a new OpenAccessLinqDataSource to a web page is to use the Data Source Configuration Wizard:
- In your page, select the data-bound control that will be used. Expand the Smart Tag panel.
From the Choose Data Source drop-down, select <New data source...>.
This will run the Data Source Configuration Wizard. The first page of the wizard is the Choose a Data Source Type dialog.
From the list with available data sources, select OpenAccessLinqDataSource. Specify an ID for the data source or use the default one.
Click OK to close the Data Source Configuration Wizard.