can anyone help me out in solving my issue. I am using the code given below:
public IEnumerable<InvoiceHeader> Getdata(Expression<Func<InvoiceHeader, bool>> predicate)
{
return AccountsContext.InvoiceHeaders.Include("Company").Include("Currency")
.Include("BusinessPartnerRoleList").Include("DocumentType")
.Where(predicate);
}
.....
In my code I am using as below
Expression<Func<InvoiceHeader, bool>> predicate = PredicateBuilder.True<InvoiceHeader>();
predicate = predicate.And(o => o.CompanyId == oInvoiceHeader.CompanyId);
List<InvoiceHeader> lstInvheader=Getdata(predicate).ToList();
By doing this I am getting the exception . [System.NotSupportedException] ---
{"The LINQ expression node type 'Invoke' is not supported in LINQ to Entities."}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…