Howto use predicates in LINQ to Entities for Entity Framework objects
You don’t need LinqKit to do this. Just remember to use Expression<Func<MyEntity, bool>> instead of Func<MyEntity, bool> Something like this: public IQueryable<MyEntity> GetAllMatchedEntities(Expression<Func<MyEntity, Boolean>> predicate) { return _Context.MyEntities.Where(predicate); } You have to use Expression because Linq to Entities needs to translate your lambda to SQL. When you use Func your lambda is compiled to IL … Read more