score:3
Accepted answer
That should be achieved using expression tree only or may be using if..else clause
How to: Use Expression Trees to Build Dynamic Queries (C# and Visual Basic)
Source: stackoverflow.com
Related Articles
- Constructing dynamic linq queries based on user input
- C# Linq - Create a dynamic select query based on user input
- How to dynamically build and return a linq predicate based on user input
- Building Dynamic LINQ Queries based on Combobox Value
- Linq dynamic queries for user search screens
- Constructing Dynamic LINQ queries with all properties of an object
- Dynamic LINQ with direct user input, any dangers?
- LINQ Queries with dynamic Order By
- Best way of constructing dynamic sql queries in C#/.NET3.5?
- How do I reference a field in Linq based on a dynamic fieldname
- Handling different databases with LINQ based off the user which is current logged in?
- Issue with dynamic LINQ queries containing brackets
- LINQ Source Code Available
- Generate dynamic LINQ expression based on array
- How to dynamic add filters to a LINQ query against an Odata Source in C#
- how do i build dynamic linq queries at runtime using strings?
- Linq2Sql - Storing Complex Linq Queries for future dynamic execuction - raw text - possible?
- Creating dynamic Linq query based on property values
- creating Linq to sqlite dbml from DbLinq source code
- Does LINQ convert code to SQL queries
- Dynamic linq-to-sql that queries based on multiple keywords
- Using dynamic objects in codedom created LINQ queries
- dynamic Linq queries with Entity Framework
- Dynamic grouping based on filters in Linq
- best way to build the dynamic linq queries in c#?
- Building dynamic where clauses in LINQ to EF queries
- Dynamic "Not" by parameter in LINQ (Or any other code for that matter)
- Dynamic queries in LINQ
- Write Dynamic LINQ queries for sorting and projecting with EF Core
- how to create dynamic linq query based on search criterias
- Get position of element in collection filtered by a condition
- Does LINQ to SQL always use Transactions by default?
- Different results LINQ vs 'normal' C# code
- Lambda Expression joining another table for average & sort
- return the Non IQueryable value via linq
- Linq SelectMany query
- Advantage of Func<T> in c#?
- Why can not get query value in a label?
- Unit testing collection contents meet certain criteria using lambdas/LINQ
- Linq: Namespace in code before unknown
- Querying xml with linq
- How can I get the last 50 elements in a list?
- LINQ: dynamic Where clause with toggle the combination of cases
- Getting error when fetching data from Sql server compact using linq
- Reuse expression to select single
- How to get parent node in a tree structure like this
- Null value in lambda WHERE clause
- How do I convert this SQL query to LINQ to SQL
- Lookup in LINQ to be based only on 1 column from joined collection
- LINQ C# Creating Dictionary of Dictionaries using GroupBy