How can linq to sql be forced to convert ntext column into nvarchar(max) in the generated sql?

后端 未结 1 1956
無奈伤痛
無奈伤痛 2021-01-15 15:24

Below problem had me look for a solution for couple of hours. I finally found it and wanted to share so I can save other people spending time on it.

I have a query i

1条回答
  •  抹茶落季
    2021-01-15 15:28

    Calling Convert.ToString("Value") caused the column values to be casted from ntext to nvarchar(max) and resulting sql was CONVERT(NVarChar(max),Value). Then sorting and grouping worked just fine.

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