C# 0 The Complete Reference



Download 4,07 Mb.
Pdf ko'rish
bet680/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   676   677   678   679   680   681   682   683   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt

LINQ Fundamentals

At LINQ’s core is the 



query

. A query specifies what data will be obtained from a data source. 

For example, a query on a customer mailing list might request the addresses of all customers 

that reside in a specific city, such as Chicago or Tokyo. A query on an inventory database 

might request a list of out-of-stock items. A query on a log of Internet usage could ask for a 

list of the websites with the highest hit counts. Although these queries differ in their specifics, 

all can be expressed using the same LINQ syntactic elements.

After a query has been created, it can be executed. One way this is done is by using the 

query in a 

foreach

 loop. Executing a query causes its results to be obtained. Thus, using a 

query involves two key steps. First, the form of the query is created. Second, the query is 

executed. Therefore, the query defines 



what

 to retrieve from a data source. Executing the 

query actually 

obtains the results.

In order for a source of data to be used by LINQ, it must implement the 



IEnumerable

interface. There are two forms of this interface: one generic, one not. In general, it is easier if 

the data source implements the generic version, 


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   676   677   678   679   680   681   682   683   ...   1096




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish