开发者

Linq to SQL VarChar(Max) Update is not working

开发者 https://www.devze.com 2022-12-14 14:46 出处:网络
I am not able to get an update to work using Linq to SQL on a VarChar(Max) field. Here is the code I use that is called from a simple DAO class:

I am not able to get an update to work using Linq to SQL on a VarChar(Max) field. Here is the code I use that is called from a simple DAO class:

public void UpdateContentById(int ContentId, string Content) {
    CkEditorDataContext db = new CkEditorDataContext();
    CkEditorContent dbContent = db.CkEditorContents.First(c => c.CkeId == ContentId);

    dbContent.CkeContent = "This is new content";

    db.SubmitChanges();
}

The CkeContent field is VarChar(Max). I noticed on this question: LINQ to SQL Update (C#)

Marco seemed to have the same issue (see answer, 5th comment), but I can't tell if he ever got an 开发者_JAVA技巧answer for that particular issue.

Any help with this is greatly appreciated.


I has the very same issue, and as far as I remember changing Property's UpdateCheck to UpdateCheck.WhenChanged will solve the problem

0

精彩评论

暂无评论...
验证码 换一张
取 消