In this chapter, we learned how we can use LINQ to write consistent queries against multiple data sources. We learned about the different components of a LINQ query and understood how we can construct them in a query. We then looked at the features in a C# language that allows us to work with LINQ such as implicit typing, object initialization syntax, lambda expressions, extension methods, and anonymous types.
We then looked at the different operators available in LINQ such as Select, SelectMany, Where, join, and Average. Using code scenarios, we looked at different situations in which we should use each of them.
We then looked at the different interfaces that LINQ queries are based on. Finally, we looked at how we can use LINQ queries to perform an operation on XML files. Using code examples, we looked at how we perform, create, update, and query operations on LINQ...