我正在尝试更新定义但遇到异常
SQL Server 不提供 NETXT、XML、Image 等的比较
不知道怎么处理。
我的表结构如下所示:
[Table]
public class Dictionary
{
private string _definition;
[Column(IsPrimaryKey = true)]
public string Word
{
get;
set;
}
[Column(CanBeNull = false, Storage="_definition", DbType="NTEXT")]
public string Definition
{
get { return this._definition; }
set { this._definition = value; }
}
}
这是我的更新代码
using (DictionaryDataContext d8db = new DictionaryDataContext(strConnectionString))
{
IQueryable<Dictionary> DicQuery = from word in d8db.tb_Dictionary where word.Word == w.Word select word;
Dictionary wordShow = DicQuery.FirstOrDefault();
wordShow.Definition = "some string";
d8db.SubmitChanges();
}