linq
-
-
microsoft'un uygulama mantiginin bir bolumunu apayri mantikta bir yerde* tutulup apayri bir mantikta* yazilmasindan igrendigi halde bin kat daha performansli cali$masindan vazgecemeyen benim gibi ki$iler icin cikaracagi oyuncak. boylece array tipindeki bir obje icerisinde sql sozdizimiyle i$ yapabilecekmi$iz. sitede verilen basit bir ornek, fikir vermesi acisindan :
// c#
string[] names = { "burke", "connor", "frank", "everett", "albert", "george", "harris", "david" };
ienumerable<string> expr = from s in names where s.length == 5 orderby s select s.toupper();
//
burke
david
frank -
microsoftun araştırma merkezinden çıkmış, c sharp 3.0 ve vb 9.0 da kullanılacak olan şu sıralar c# ve vb nin previewlerı çıkmış bulunan system.query.dll, system.data.dlinq.dll, system.xml.xlinq.dll ler sayesinde object, xml ve database'i dilin içerisinden inline querylemeyi sağlayan yeni dil eklentisi.
http://msdn.microsoft.com/…etframework/future/linq/ adresinde bir çok video ve tutorial bulunabilir. ayrıca karıştırmak isteyenlere c# ve vb'in preview instalları mevcut. yalnız kurulum compiler'ları modifiye edeceğinden, ide ve compilerlar bir daha adam olmuyor, format bile isteyebiliyor. ona göre.
linq ile ilgili veya linq releasei ile çıkan yeni konular şu şekilde sıralanabilir.
(bkz: lambda expression)
(bkz: nullable type)
(bkz: extension methods)
(bkz: dlinq)
(bkz: xlinq)
linq query operatörleri: *
oftype tipe göre filitrelemeon
select/selectmany project based on transform function
where filter based on predicate function
count count based on optional predicate function
all/any universal/existential quantification based on predicate function
first/firstordefault access initial member based on optional predicate function
elementat access member at specified position
take/skip access members before/after specified position
takewhile/skipuntil access members before/after predicate function is satisfied
groupby partition based on key extraction function
todictionary create key/value dictionary based on key extraction function
orderby/thenby sort in ascending order based on key extraction function and optional comparison function
orderbydescending/
thenbydescending
sort in descending order based on key extraction function and optional comparison function
reverse reverse the order of a sequence
fold aggregate value over multiple values based on aggregation function
min/max/sum/average numeric aggregation functions
distinct filter duplicate members
except filter elements that are members of specified set
intersect filter elements that are not members of specified set
union combine distinct members from two sets
concat concatenate the values of two sequences
toarray/tolist buffer results of query in array or list<t>
range create a sequence of numbers in a range
repeat create a sequence of multiple copies of a given value -
(bkz: comega)
-
(bkz: serefsizim aklima geldiydi)
-
onemli olanin belli bir ozelligin piyasada en cok tutulan, kullanilan dile entegre edilip tum developerlarin kolayca kullanmasini saglamak oldugunu anlamayan, anlamak istemeyen belki de herkesin kullanabilmesini kaldiramayan kisi veya kurumlarin "yine" bir kez olsun pratikte kullanmadigi dillerin benzer ozelliklerini kallavi bir arastirma yapmadan, hayal dunyalariyla karsilastirabildikleri eklenti.
(bkz: hic kullanabilenle kullanamayan bir olur mu)
linq for beginners
http://blogs.msdn.com/…technical-links-to-linq.aspx
query expressions
http://blogs.msdn.com/…1/the-linq-farm-part-ii.aspx
2 yil sonra gelen edit: a$ik oldum ben buna, onsuz bir kod dusunemez oldum, veritabani baglantili kod yazmaktan orgazmdan daha zevk alir oldum. -
(bkz: hibernate)
-
cok muhtemel yeni bir uzmanlik alani olacak, ".net programcisi ariyoruz" ilanlarinin sartlar listesine en tepeden girecektir.
-
" so what we're leveraging there; is a capability that is also known in some functional pro languages. that some people call meta-programming. it's the ability for programs to obtain a representation of themselves... and then manipulate that representation.
programs like lisp..i mean that is like power lisp.
it's like... the program and data is kind of a same thing. when you're write a program you're just writing a data structure and when you executing your program, you're just executin the data structure that is your program. :)
in a sense right?
then that's really the sort capability we're now adding to c#
that has been known in other functional programming languages.
*** so...so it's like..like they say there are no new ideas, they are just new ways of putting together old ideas.
that's really in a sense what we're doing here...
i wanna give a lot of credit...to all of...i mean
it's not like we invented all this. i will claim though we invented a a whole new way of putting it together. ***"
anders hejlsberg
http://blogs.msdn.com/…-functional-programming.aspx
http://download.microsoft.com/…rslinqfunctional.zip
psalm 19:27 - 20:24 -
linq to sql ile $ukelaların $ukelasıdır.
c# için 101 linq örneği;
http://msdn.microsoft.com/…us/vcsharp/aa336746.aspx
ekşi sözlük kullanıcılarıyla mesajlaşmak ve yazdıkları entry'leri
takip etmek için giriş yapmalısın.
hesabın var mı? giriş yap