LINQ (Language Integrated Query) data को query और transform करने का एक एकीकृत, expressive तरीका प्रदान करता है — collections, databases, XML — एक consistent syntax का उपयोग करते हुए। यह functional-style operations (filter, map, group, aggregate) को सीधे C# में लाता है, data manipulation को concise व readable बनाते हुए।
Method syntax (सामान्य रूप)
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);
