LINQ (Language Integrated Query), veri sorgulama ve dönüştürme işlemleri — koleksiyonlar, veritabanları, XML — için birleşik ve ifadeli bir yol sağlar ve tutarlı bir sözdizimi kullanır. Fonksiyonel stil işlemleri (filtreleme, dönüştürme, gruplama, toplama) doğrudan C#'a getirir ve veri manipülasyonunu kısa ve okunabilir hale getirir.
Method syntax (yaygın form)
adults = people
.Where(p => p.Age >= )
.OrderBy(p => p.Name)
.Select(p => p.Name.ToUpper())
.ToList();
total = numbers.Sum();
count = people.Count(p => p.IsActive);
first = people.FirstOrDefault(p => p.Id == );
any = people.Any(p => p.Age > );
groups = people.GroupBy(p => p.City);
max = people.Max(p => p.Age);
