Description
- LINQ overview and features
- LINQ — language-integrated query syntax in C# and VB that brings declarative, SQL-like queries into the language.
- Query syntax vs method syntax — supports comprehension-style from/where/select and fluent lambda-based operators like Where, Select, OrderBy.
- LINQ providers — abstraction layer that translates LINQ expressions to different back ends (Objects, SQL, XML, Entities).
- LINQ to Objects — operates on IEnumerable<T> for in-memory collections and is eager in projection but supports deferred execution for queries.
- LINQ to SQL and LINQ to Entities — translate expression trees into SQL; understanding translation limits and generated SQL is essential for performance.
- IQueryable vs IEnumerable — IQueryable enables remote query translation and deferred execution; IEnumerable executes in-memory.
- Expression trees — represent queries as data structures that providers inspect and convert; mastering them enables custom providers and advanced translations.
- Deferred execution and streaming — many operators build an execution plan that runs only on enumeration, enabling pipelined processing and lower memory use.
- PLINQ — parallel LINQ for data-parallel queries on multicore CPUs; useful for CPU-bound transformations but requires thread-safety awareness.
- Mapping and projection — Select, SelectMany, and anonymous/object projections are core for shaping results and minimizing data transfer.
- Grouping and aggregation — GroupBy, Aggregate, Sum, Average support complex rollups; watch provider translation for efficient SQL generation.
- Query optimization patterns — push filters before projections, avoid client-side evaluation, prefer server-side paging, and profile generated SQL.
- Asynchronous queries — IAsyncEnumerable and EF Core async extensions enable nonblocking I/O for database calls in modern apps.
- Custom providers and expression visitors — building an IQueryable provider or using ExpressionVisitor is an advanced skill for translating domain-specific queries.
- Integration with ORMs and XML/JSON — LINQ to XML simplifies document queries; EF Core and other ORMs integrate LINQ for typed, compile-time-checked queries.
- Testing and maintainability — prefer small, composable queries, mockable providers, and unit tests that assert both semantics and generated SQL when relevant.
- Advanced interview topics for senior candidates — explain expression tree internals, provider design, query translation pitfalls, PLINQ tradeoffs, and real-world optimization case studies.




