1 / 9

MS LINQ

MS LINQ. By: Luis Carranco CIS764 - Fall 2008. Content. What is LINQ Architecture How does it work? Samples/Demo Why to use LINQ?. What is LINQ?. Language Integrated Query for .NET C# 3.0, VB 9.0

nasya
Download Presentation

MS LINQ

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MSLINQ By: Luis Carranco CIS764 - Fall 2008

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

  3. What is LINQ? • 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<T> interface. • Relational data • XML • Object collections

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

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

  6. Demo

  7. Why to use LINQ? • 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

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

  9. Questions?

More Related