Enhanced ADO.NET Data Providers for SQL Server, Oracle, MySQL, PostgreSQL, and SQLite Databases

Sat Oct 11 16:25:12 CST 2008发表于Delicious/tag/mysql
阅读全文...
 
本站相关内容:(RSS)

LINQ, Entity Framework and ADO.NET Entity Framework and Data Services for the Web

The new wave of Web applications are built on technologies such as AJAX and Microsoft Silverlight, which enable developers to build better, richer user experiences. These technologies bring a shift in how applications are organized, including a stronger separation of presentation from data. Technologies such as Language Integrated Query (LINQ) and ADO.NET Entity Framework and Data Services simplify the job of developers. The ADO.NET Entity Framework raises the level of abstraction for data programming. It is the evolution of ADO.NET that allows developers to program in terms of the standard ADO.NET abstraction or in terms of persistent objects (ORM) and is built upon the standard ADO.NET Provider model. The Entity Framework introduces a set of services around the Entity Data Model (EDM) (a medium for defining domain models for an application).

The myth of LINQ (simplest sample for ADO.NET Entity Data Model)


If you are a .NET fan out there then you will basically hearing from many people asking, I have ADO.NET 2.0 so why is there a LINQ? It was a myth to me too. After Microsoft launch Service Pack 1 for Visual Studio 2008 then I clear some of my cloud in my head.

I will only mention one of the unique features here, ADO.NET Entity Data Model from ADO.NET Entity Framework. I have not found a better way to bind the Entity Model to DataGridView web control.

In order to create ADO.NET Entity Data Model, right click either Windows Application Project or Web Application Project and choose Add New Item… . Select ADO.NET Entity Data Model from the Add New Item dialog. After that you will have a file with edmx extension.

I have created a complete Windows Application sample using Northwind database in MS SQL 2008 Express. The Entity named NorthwindEntities. The entire sample consisted of 2 controls, 1 DataGridView and another is Button. I only have few lines of code in Button click event as below.

 private void btnGetCustomers_Click(object sender, EventArgs e)

{

  NorthwindEntities nwe = new NorthwindEntities();

 

  var cus = from customer in nwe.Customers

            select customer;

 

  dataGridView1.DataSource = cus;

}

I guess no one will ever say this is difficult.

The complete code is in http://skydrive.live.com. The sample file name is WinAppEntities.rar. My MSN ID is chanmmn@hotmail.com.

Unfortunately, ADO.NET Entity Data Model is not working with Oracle Database yet.

互联网相关内容:
SQLSummit.com: Catalog of ADO.NET Data Providers (2008年04月28日)
LINQ, Entity Framework and ADO.NET Entity Framework and Data Services for the Web (2008年04月01日)
The myth of LINQ (simplest sample for ADO.NET Entity Data Model) (2008年10月19日)
Download UniDirect .NET Data Provider 2.05 Free - An enhanced universal data provider. (2007年10月03日)
迈向Data 2.0——学习使用ADO.NET数据服务框架 (2008年08月14日)
迈向Data 2.0——在客户端操作ADO.NET数据服务 (2008年08月18日)
MySQL and ADO.NET (2008年03月05日)
Learning ADO.NET (2008年03月13日)