Export (0) Print
Expand All

EntityDataSource Web Server Control Overview

The ADO.NET EntityDataSource control supports data binding scenarios in Web applications that use the ADO.NET Entity Framework. Like the Entity Framework, the control is available as part of the .NET Framework 3.5, beginning with SP1. Users accustomed to the design-time model of ASP.NET data binding controls will find the programming surface of the EntityDataSource control similar to the SqlDataSource, LinqDataSource, XmlDataSource, and ObjectDataSource controls.

Like the other Web server data source controls, the EntityDataSource control manages create, read, update, and delete operations against a data source on behalf of data-bound controls on the same page. The EntityDataSource works with editable grids, forms with user-controlled sorting and filtering, dually bound drop-down list controls, and master-detail pages.

The EntityDataSource control enables you to bind Web controls on a page to data in an Entity Data Model (EDM). As with the query builder methods of ObjectQuery<T>, queries are constructed using fragments of Entity SQL syntax assigned to the Where, OrderBy, GroupBy and Select properties. You can supply parameter values to these operations from page controls, cookies, query parameters appended to the page URI, and other ASP.NET parameter objects. Prior to the version 4, you could construct queries only in Entity SQL. Starting with the  4, you can extend your queries by applying LINQ queries on top of an Entity SQL query in the QueryCreated event. For more information, see Applying LINQ Queries to EntityDataSource. The EntityDataSource designer makes it easier to configure an EntityDataSource control at design time.

Community Additions

© 2014 Microsoft