Wednesday, July 9, 2008

LINQ to SQL in C#

This article provides an introduction to employing LINQ to SQL within a Windows Forms application.
Article will address the incorporation of LINQ to SQL into a win forms project, how to use LINQ to SQL to select, insert, update, and delete data, and how to use LINQ to SQL to execute stored procedures.


The article shows some simple examples of LINQ to SQL; from it you can see how easy it is to query against single and related tables and to write filtered queries, execute stored procedures, perform aggregation, and how to insert, update, and delete records from the database.


DataClasses1DataContext dc = new DataClasses1DataContext();
var q =
from a in dc.GetTable()
where a.CustomerID.StartsWith("A")
orderby a.OrderDate ascending
select a;
dataGridView1.DataSource = q;


click here for full article

3 comments:

Stretching said...

WoW nice blog buddy!Actually WoW is my favorite appreciation keyword.I also like to play. Wow Gold. I was looking for info regarding that and saw your website. Its nice and very interesting.

venki said...

it was copied from code project

venki said...

it was copied from code project