Ste
Ste

Reputation: 323

Which is the difference between ADO.NET data services and data source controls

I'm trying to understand the difference between ADO.NET data services and data source controls for working with data trought an ASP.NET webforms. As far as I know data source controls are a set of controls includes the simple SQLDataSource to the EntityDataSource. SQLDataSource needs to go directly to a DB, so no access to Entity Model is needed but EntityDataSource as work with Entities need to access to EDM... probably something is not clear or too many things are overlapping. MS docs is not helping me.

Upvotes: 2

Views: 1043

Answers (2)

Min Min
Min Min

Reputation: 6228

ADO.net Data Service (WCF Data Service) and Data Source Controls are just two different thing.

Data Source Controls are just controls which bind data to UI controls (Gridview, Listview, etc..). (If you take a look in MSDN, all these controls drived from System.Web.UI.Control and their namespace are System.Web.UI.WebControls). To bind data to your UI controls, data could come from variety of sources such as from database, xml, edm or collection of objects, etc... Data Sources Controls connect to and retrieve data from these data sources and make it available for UI controls to bind to, without requiring code. (If your ui control need to bind directly to database, you would use SqlDataSource, or if you are using Entity Data Model (a additional layer on Database), you would use with EntityDataSource.)

WCF Data Service (Formally known as ADO.net Data Service) is a framework for exposing data layer in web service using Open Data Protocol(OData) as a REST-ful manner. It is actually a combination of the Runtime and a Web service and Entity Framework. And it also known as N-Tier data access solution from Microsoft because WCF Data Services also includes a client component that takes care of tracking changes you make to data on the client, pushing those changes back to the database, and saving them when using with Entity Framework model.

Upvotes: 1

IrishChieftain
IrishChieftain

Reputation: 15252

"ADO.NET Data Services facilitates the creation of flexible services that more naturally integrate data to the web. It relies on semantic over data via an Entity Data Model and it surfaces those data services as REST-style resources over an addressable URI. So interaction can occur over simple HTTP (GET, SET, DELETE)."

Talking Points: ADO.NET Data Services

Upvotes: 0

Related Questions