我在写一个访问者,它将查询转换为IQueryable。它使用Aggregate方法与种子null然后使用一些func来转换它。我的问题是这个null类型是decimal?。但是,我得到一个异常 'Expression of type 'System.Object' cannot be used for parameter of type
'System.Nullable`1[System.Dec
我有一个表: MyTable
(
ParentId Integer,
Type Integer,
ProdId String,
Date DateTime,
Status Integer
);
我要查询的未来: var res = from tout in myTable.Where(t1 => t1.Type == 1)
join tin in myTable.W
我想扩展我的IQueryable以获取字段名列表并仅将这些列返回到动态集合中。基本上我想用传入的字段/列名实现“选择”。该方法会是这个样子: private IQueryable<TEnity> SetSelect(IQueryable<TEntity> query, List<string> fieldnames)
{
//Build up the Expression here