Call function in dynamic linq

后端 未结 7 928
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-31 21:13

I\'m trying to call a function in a dynamic linq select statement, but im getting error:

No property or field \'A\' exists in type \'Tuple2\'
7条回答
  •  孤独总比滥情好
    2020-12-31 21:58

    I may be confused but your syntax whereby you are using a string in your Selects doesn't compile for me. The following syntax works:

    var q = b.AsQueryable().Select(it => A.Test(it.Item1));
    

提交回复
热议问题