Tải bản đầy đủ (.pdf) (7 trang)

x0013 linq and c morebook vn 8492

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (127.36 KB, 7 trang )

A new way and language to query data

28 JUNI 2006 | © CLASS-A


Overview



What is Linq?



Flavors of Linq
• Linq to XML
• Linq to DataSets
ã Linq to SQL

28 JUNI 2006 | â CLASS-A

ã

Linq under the covers



Linq deferred



Q&A and/or Discussion


2


Introducing…



Alex Thissen
• Trainer/coach
• Weblog at



INETA
• Next step in user group evolution
• By and for user group community



Class-A
• Knowledge provider
• Training and coaching on Microsoft development
• www.class-a.nl

28 JUNI 2006 | © CLASS-A

3


What is Linq?




Linq stands for Language Integrated Query



New set of keywords in C# 3.0 and VB.NET 9.0
to express queries over data
IEnumerable<Match>
Dim
homeMatchesWon As
homeMatchesWon
IEnumerable(Of
= Match) =
from m In
From
in matches
where m.GoalsHome > m.GoalsAway
Where
order By
Order
by m.HomeTeam, m.AwayTeam Descending
descending
select m
Select
m;

28 JUNI 2006 | © CLASS-A


4


Linq project

Languages

C# 3.0 VB 9.0 Other

Linq
Standard Query Operators
Linq to Linq to Linq to Linq to
Linq to
Objects XML
SQL
DataSets Entities

28 JUNI 2006 | © CLASS-A

5


Review



Linq == querying from programming language




C# 3.0 was created to make Linq happen



Several applications of Linq exist
• Linq to Objects, XML, DataSets, SQL, Entities
• More to come in the future



28 JUNI 2006 | © CLASS-A

Linq approaches functional programming

57


28 JUNI 2006 | © CLASS-A



×