Download presentation
Presentation is loading. Please wait.
Published byLucas Hutchinson Modified over 9 years ago
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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.