Allows you to dynamically composing expression predicates to be used in WHERE clauses in LINQ and also in EntityFramework.
Questions tagged [predicatebuilder]
241 questions
2
votes
1 answer
Create predicate on Date field for Hazelcast
Does anyone know how to create the date type predicate for Hazelcast?
I use Predicates.equal("date","value"); It doesn't work properly. I pass an existing date value in Hazelcast. It returns nothing. java.util.date should be comparable.
I don't…

crazy_develerper
- 107
- 1
- 1
- 8
2
votes
2 answers
predicate builder c# confusion
I'm trying to understand predicate builder so I can apply it to a web app I'm creating.
Basically I have 4 parameters that come in through a POST request, 'name', 'location', 'age', 'gender', and I have to filter out people from a database table…

Abdul Ahmad
- 9,673
- 16
- 64
- 127
2
votes
1 answer
How to use PredicateBuilder with nested OR conditionals in Linq
I've been very happily using PredicateBuilder but until now have only used it for queries with only either concatenated AND statements or OR statements. Now for the first time I need a pair of OR statements nested along with a some AND statements…

tblank
- 257
- 2
- 6
- 14
2
votes
1 answer
LinqKit Predicate Builder throws TypeLoadException?
I am experiencing a problem while attempting to execute a query that I have built dynamically using PredicateBuilder.
I am able to build the query but when executing the query itself I get the following "TypeLoadException"...
When running: return…

BenjaminPaul
- 2,931
- 19
- 18
2
votes
1 answer
Generated SQL with PredicateBuilder, LINQPad and operator ANY
I previously asked a question about chaining conditions in Linq To Entities.
Now I use LinqKit and everything works fine.
I want to see the generated SQL and after reading this answer, I use LinqPad.
This is my statement:
var predProduct =…

Sig. Tolleranza
- 499
- 9
- 27
2
votes
2 answers
How to filter related data using Entity Framework and LINQ to SQL and LinqKit PredicateBuilder Or IdeaBlade DevForce
I am using Entity Framework 6.1.0 and LINQ to SQL
My object graph:
Market 1...n MarketAsset n...n CompanyMarket n...1 Company
So,
Market has a Collection of MarketAsset called MarketAssets
MarketAsset has a collection of CompanyMarket called…

Marco Alves
- 2,776
- 3
- 23
- 33
2
votes
1 answer
PredicateBuilder Returns No Rows
This code correctly returns one row:
_loadedAssemblies.ForEach(x =>
{
foundTypes.AddRange(from t in x.GetTypes()
where t.GetInterfaces().Contains(typeof(TInterface))
&& t.BaseType.Name.LeftOf('`') ==…

Bob Horn
- 33,387
- 34
- 113
- 219
2
votes
1 answer
Build LINQ Select conditionally similar of using PredicateBuilder for Where clause
I'm working with dynamic queries using LINQ on Entity Framework.
To query some tables by user input filters, we are using PredicateBuilder to create conditional WHERE sections. That works really great, but the number of columns returned are…

Romias
- 13,783
- 7
- 56
- 85
2
votes
1 answer
Entity Framework and Predicate Builder - Predicates being Ignored in SQL Query
I'm having a problem with EF and Predicate Builder. I've been through all the instructions and I'm pretty sure I'm doing everything right, but when I run SQL Profiler and inspect the query going to the database, it's ignoring my predicates and…

Owen
- 4,229
- 5
- 42
- 50
2
votes
1 answer
Predicatebuilder group and or queries with inner outer
I've got a pretty straightforward predicate builder query that works well. We have a list of keywords to search on, and we loop through those keywords to see if any of our object properties match up.
var predicateSearchText =…

TheRedDwarf
- 183
- 1
- 13
2
votes
4 answers
Using PredicateBuilder with VB.NET
I have recreated the Predicatebuilder class in a seperate C# project and I'm trying to use it in a VB.NET project but I keep getting the following error:
Overload resolution failed because no accessible 'Or' accepts this number of arguments.
when…

rollercoast
- 51
- 1
- 6
2
votes
1 answer
Searching if all properties exist in a list of entities using Linq
I have the following entities:
[Table("Entities")]
public abstract class Entity {
public int EntityID { get; set; }
public string Description { get; set; }
public virtual ICollection Tags { get; set; }
}
And the Tag Entity:
public class…

Matthew
- 9,851
- 4
- 46
- 77
2
votes
3 answers
How do I trace a linq query when using PredicateBuilder/AsExpandable?
I am using PredicateBuilder, which means that I am using the AsExpandable extension method. The problem is that I can no longer Trace my SQL queries as the following error is thrown when I try to cast the query to ObjectQuery so that I can do a…

Calanus
- 25,619
- 25
- 85
- 120
2
votes
1 answer
EF 5.0, PredicateBuilder and LinqKit
Starting using LinqKit from Mr J. Albahari, does anyone know if there might be some caveats or things to be aware of with the release of EF 5.0 ?
Would there be any major changes in EF 5.0 and L2E that would imply using differently (or not to use…

Antoine Meltzheim
- 9,579
- 6
- 35
- 41
2
votes
1 answer
Linq PredicateBuilder multi criteria
List Prs = data.Products
.Where(x=> x.ProductColors
.Where(y=> y.Color=="blue")
.Select(z=> z.ProductID)
.Contains(x.ID) &&…

user1439338
- 130
- 7