You’re probably looking for something like Predicate Builder which allows you to control the AND’s and OR’s of the where statement easier.
There’s also Dynamic Linq which allows you to submit the WHERE clause like a SQL string and it will parse it into the correct predicate for a WHERE.
More Related Contents:
- Dynamic where clause (OR) in Linq to Entities
- How to create LINQ Expression Tree to select an anonymous type
- ‘Contains()’ workaround using Linq to Entities?
- “A lambda expression with a statement body cannot be converted to an expression tree”
- Bulk-deleting in LINQ to Entities
- Writing Recursive CTE using Entity Framework Fluent syntax or Inline syntax
- The type of one of the expressions in the join clause is incorrect in Entity Framework
- Entity framework left join
- LEFT JOIN in LINQ to entities?
- How to compare only date components from DateTime in EF?
- “The LINQ expression node type ‘Invoke’ is not supported in LINQ to Entities” – stumped!
- Entity-framework code is slow when using Include() many times
- Linq to Entity Join table with multiple OR conditions
- ‘Date’ is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported
- The LINQ expression could not be translated and will be evaluated locally
- Calling a SQL User-defined function in a LINQ query
- The LINQ expression node type ‘ArrayIndex’ is not supported in LINQ to Entities
- Should the order of LINQ query clauses affect Entity Framework performance?
- How do I apply OrderBy on an IQueryable using a string column name within a generic extension method?
- The cast to value type ‘Int32’ failed because the materialized value is null
- Entity Framework. Delete all rows in table
- ‘datetime2’ error when using entity framework in VS 2010 .net 4.0
- LINQ, Unable to create a constant value of type XXX. Only primitive types or enumeration types are supported in this context
- Simulating Cross Context Joins–LINQ/C#
- Entity Framework | Sequence contains more than one matching element
- Max return value if empty query
- Keyword Not Supported: Metadata
- How to do an “in” query in entity framework?
- big issue in converting string to datetime using linq-to-entities
- Is Injection Possible through Dynamic LINQ?