LINQ problems with NText, Text and Image on SQL server

邮差的信 提交于 2019-12-05 02:09:13

The problem is that the Refresh mode is attempting to compare the current with the database version of all the fields, and SQL doesn't support that kind of comparison text, ntext and image columns (at least not on SQL Server 2000).

The solution is to add the following attribute to your column definition

UpdateCheck = UpdateCheck.Never

e.g.

[Column(DbType = "NText", CanBeNull = true, UpdateCheck = UpdateCheck.Never)]

Then the Refresh mode works OK and SubmitChanges doesn't have any further problems.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!