我想将表达式作为参数发送,但是我收到了这个错误 “表达式树可能不包含动态操作” 在将Func转换为Expression>
的行public List<dynamic> GetBy(Func<dynamic, bool> WhereExpression)
{
try
{
Expression<Func<dynamic, bool>> tt = c => WhereExpression(c) ;
return (from c in DaynamicContext.GetTable(tbl).Cast<dynamic>()
where tt
select c).ToList();
}
catch (Exception ex)
{
Logs.Log(ex);
return null;
}
}