Int.Parse in Linq Expression

后端 未结 7 1752
花落未央
花落未央 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条回答
  • 2020-12-01 22:06

    Entity Framework can't translate that type of conversion to SQL.

    Is there any chance you could alter your data structure to use proper data types such as actual DateTime types? For large data volumes conversions like that will affect performance.

    I would recommend either changing your data model types to avoid these conversions, or if the amount of data will always be small, then get the data first, and later use Linq to Objects.

    0 讨论(0)
提交回复
热议问题