Int.Parse in Linq Expression

后端 未结 7 1870
花落未央
花落未央 2020-12-01 21:18

I have the following LINQ expression. I want calculate the sum of numeric values in an nvarchar field. I\'m using following code to do this, but I get an error

7条回答
  •  旧时难觅i
    2020-12-01 22:01

    In your where clause, you can't call int.Parse. Entity Framework doesn't know how to convert that to SQL. Consider revising your Where.

提交回复
热议问题