Ms linq
Download
1 / 9

MS LINQ - PowerPoint PPT Presentation


  • 247 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' MS LINQ' - nasya


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Ms linq

MSLINQ

By: Luis Carranco CIS764 - Fall 2008


Content
Content

  • What is LINQ

  • Architecture

  • How does it work?

  • Samples/Demo

  • Why to use LINQ?


What is linq
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


Architecture
Architecture

4

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


How it works

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



Why to use linq
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


Resources
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.



ad