LINQ (Language Integrated Query) డేటాను ప్రశ్నించడానికి మరియు రూపాంతరం చేయడానికి ఒక ఏకీకృత, వ్యక్తీకరణ పూర్ణ మార్గాన్ని అందిస్తుంది — సేకరణలు, డేటాబేస్లు, XML — సమాన వాక్యనిర్మాణాన్ని ఉపయోగించి. ఇది functional-style operations (filter, map, group, aggregate) ను నేరుగా C#లోకి తీసుకుస్తుంది, డేటా తారుమారుని సంక్షిప్తమైనది మరియు పఠనీయమైనది చేస్తుంది.
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);
