Course Goals• Understand the new C# 3.0 language features – Motivation – Design Patterns – Pros and Cons • Understand the Language Integrated Query LINQ framework... Future Context• Vi
Trang 1LINQ via C# 3.0
Chapter 1 – Introduction
Trang 2• Working knowledge of Microsoft® Visual C#® 2.0
– Generics
– Anonymous methods
– Iterators (yield return)
• Working knowledge of the NET
Framework
– Collection classes
Trang 3Course Goals
• Understand the new C# 3.0 language
features
– Motivation
– Design Patterns
– Pros and Cons
• Understand the Language Integrated
Query (LINQ) framework
Trang 4Course Agenda
• Chapter 1 – Introduction
• Chapter 2 – C# 3.0 Language Features
• Chapter 3 – LINQ Query Operators
• Chapter 4 – LINQ to Objects
• Chapter 5 – LINQ to XML
• Chapter 6 – LINQ to SQL
• Chapter 7 – Beyond LINQ
Trang 5LINQ in Context
• LINQ is supported by NET 3.5 and C# 3.0
2002/2003 2005 2006 2008
Microsoft
Visual
Studio®
2002/2003
Visual Studio
2005
Visual Studio
2005 + Extensions
Visual Studio 2008
C# 1.0 C# 2.0 C# 2.0 C# 3.0
.NET 1.0/1.1 NET 2.0 NET 3.0 .NET 3.5
CLR 1.0 CLR 2.0 CLR 2.0 CLR 2.0 SP1
Trang 6Latest Framework Developments
• NET 3.0
– Windows® Communication Foundation (WCF)
– Windows Presentation Foundation (WPF)
– Windows Workflow Foundation (WF)
• NET 3.5
– LINQ
– Managed Add-In Framework
– WPF Enhancements
Trang 7Future Context
• Visual Studio 2008 and NET 3.5 SP1
– Currently in Beta 1: http://tinyurl.com/4xupp8
• ADO.NET Entity Framework
• ADO.NET Data Services
• MFC Feature Pack and TR1
• Performance Improvements
• Bug Fixes
Trang 8Why LINQ
? Why LINQ
?
• Data != Objects
• State-of-the-art tooling has perfected OO methodologies
• The next challenge:
information, while abstracting away its source