13.07.2015 Views

C# in Depth

C# in Depth

C# in Depth

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

LINQ beyond collectionsThis chapter covers■■■■■■LINQ to SQLBuild<strong>in</strong>g providers with IQueryableLINQ to DataSetLINQ to XMLThird party-LINQFuture Microsoft LINQ technologiesIn the previous chapter, we saw how LINQ to Objects works, with the <strong>C#</strong> 3 compilertranslat<strong>in</strong>g query expressions <strong>in</strong>to normal <strong>C#</strong> code, which for LINQ to Objects justhappens to call the extension methods present <strong>in</strong> the Enumerable class. Even withoutany other features, query expressions would have been useful for manipulat<strong>in</strong>gdata <strong>in</strong> memory. It probably wouldn’t have been worth the extra complexity <strong>in</strong> thelanguage, though. In reality, LINQ to Objects is just one aspect of the big picture.In this chapter we’ll take a whirlw<strong>in</strong>d tour of other LINQ providers and APIs.First we’ll look at LINQ to SQL, an Object Relational Mapp<strong>in</strong>g (ORM) solution fromMicrosoft that ships as part of .NET 3.5. After we’ve seen it work<strong>in</strong>g as if by magic,we’ll take a look at what’s happen<strong>in</strong>g beh<strong>in</strong>d the scenes, and how query expressionswritten <strong>in</strong> <strong>C#</strong> end up execut<strong>in</strong>g as SQL on the database.314Licensed to Rhona Hadida

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!