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.
Comments (5)
Is there any or it will by any support for Oracle (linq for Oracle?)
Posted by Kamil F | February 5, 2009 5:37 AM
Posted on February 5, 2009 05:37
There is an free oracle implementation at:
http://www.codeplex.com/LinqToOracle
LINQ its not a Myth, its a fact that Java Programmers wish to have, but they dont.
Posted by Christiano Coutinho | March 8, 2009 9:11 PM
Posted on March 8, 2009 21:11
Java programmers have "Persistence". With better support for the Oracle database.
Posted by Mike | May 18, 2009 11:02 PM
Posted on May 18, 2009 23:02
if you favor linq to oracle, please try alinq, the bestest database linq provider. it supports Access, SQLite, Oracle, MySQL and Firebird database.please visit http://www.alinq.org
Posted by Anonymous | July 14, 2009 8:41 PM
Posted on July 14, 2009 20:41
alinq is not very good and is riddled with bugs. I was completly broken as far as oracle provider goes. I think it is a scam.
Posted by Scott Guthrie | October 8, 2009 11:40 PM
Posted on October 8, 2009 23:40