How to do a Sum using Dynamic LINQ

后端 未结 4 534
暗喜
暗喜 2021-01-11 23:13

I have the following which works brilliantly with the dynamic linq library:

string where = \"Price < 5\";
string orderby = \"BookID ASC\";
IQueryable

        
4条回答
  •  被撕碎了的回忆
    2021-01-12 00:04

    This code worked for me:

    float? fSum = qryQueryableData.Select("Price").Cast().Sum();

    Where "Price" is a column of type "float?"

    Explanations available here.

提交回复
热议问题