C# Eval Expression - LINQ Dynamic
Extend the IEnumerable<T> and IQueryable<T> interface with methods to use LINQ with dynamic expressions.
LINQ (Language Integrated Query) has been introduced in .NET 3.5 and since has been one of the most used features. ORM like Entity Framework takes advantage from this feature and allow you to write type-safe queries.
The theory wants you only to use type-safe queries. However, the reality requires often you to write LINQ with dynamic query expressions.
LINQ Dynamic - Predicate
You can use any LINQ method that support predicate with a dynamic C# expression :
LINQ Dynamic - Ordering and Selecting
You can use any ordering and selecting method with a dynamic C# expression:
The “Dynamic” suffix is required for not overriding the default behavior (ordering or selecting by a string is valid).
LINQ Dynamic - Execute
You can push the LINQ Dynamic experience further by using the Execute method and chaining anything else: