The LINQ expression node type 'Lambda' is not supported in LINQ to Entities

Viewed 2974

I'm trying use Expression and pass to query. But I have error - The LINQ expression node type 'Lambda' is not supported in LINQ to Entities. I'm also used linqkit.dll with AsExpandable(), but but have the same error.

public List<Correct> GetCorrects(Expression<Func<Correct, bool?>> predicate)
{
    using (SystemsEntities context = new SystemsEntities())
    {
        var result = context.Corrects.Where(x => predicate == null);
        return result.ToList();
    }
}

I get the error stated above. What is failing?

1 Answers
Related