Presentation is loading. Please wait.

Presentation is loading. Please wait.

By: Luis Carranco CIS764 - Fall 2008.  What is LINQ  Architecture  How does it work?  Samples/Demo  Why to use LINQ? 2.

Similar presentations


Presentation on theme: "By: Luis Carranco CIS764 - Fall 2008.  What is LINQ  Architecture  How does it work?  Samples/Demo  Why to use LINQ? 2."— Presentation transcript:

1 By: Luis Carranco CIS764 - Fall 2008

2  What is LINQ  Architecture  How does it work?  Samples/Demo  Why to use LINQ? 2

3  Language Integrated Query for.NET  C# 3.0, VB 9.0  Unifies the way data can be retrieved from any object that implements the IEnumerable interface. ◦ Relational data ◦ XML ◦ Object collections 3

4 44 Image taken from LINQ for Visual C# 2008. Fabio Ferracchiati

5 5 LINQ to SQL SQL Server from c in db.Customers where c.City == "London" select c.CompanyName from c in db.Customers where c.City == "London" select c.CompanyName Execute (Iteration) SELECT CompanyName FROM Customer WHERE City = 'London' SELECT CompanyName FROM Customer WHERE City = 'London' SQL Query Rows Objects db.Customers.Add(c1); c2.City = “Seattle"; db.Customers.Remove(c3); db.Customers.Add(c1); c2.City = “Seattle"; db.Customers.Remove(c3); SubmitChanges() INSERT INTO Customer … UPDATE Customer … DELETE FROM Customer … INSERT INTO Customer … UPDATE Customer … DELETE FROM Customer … DML

6 6

7  Only one syntax to retrieve data from any data source  Productivity. Focus on business  Compiler checks queries and type safety  Avoid SQL, XPath  Rich set of instructions to implement complex queries that support data aggregation, joins, sorting, and much more 7

8  The LINQ Project http://msdn.microsoft.com/en-us/netframework/aa904594.aspx Accessed 11/16/2008 http://msdn.microsoft.com/en-us/netframework/aa904594.aspx  LINQ for Visual C# 2008. Fabio Claudio Ferracchiati. 1st Edition. Apress.  Programming Microsoft LINQ. Paolo Pialors, Marco Russo. MSPress. 8

9 9


Download ppt "By: Luis Carranco CIS764 - Fall 2008.  What is LINQ  Architecture  How does it work?  Samples/Demo  Why to use LINQ? 2."

Similar presentations


Ads by Google