Linq to SQL VarChar (Max) update not working

I can’t get an update to work using Linq to SQL in the VarChar (Max) field. Here is the code I'm using that is being 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();
}

CkeContent field - VarChar (Max). I noticed on this question: LINQ to SQL Update (C #)
Marco had the same problem (see Answer, 5th comment), but I can’t say if he ever received an answer to this specific problem.

Any help with this is much appreciated.

+3
source share
1 answer

I have the same problem, and as far as I remember, changing Property UpdateCheck for UpdateCheck.WhenChanged will solve the problem

0

Source: https://habr.com/ru/post/1726476/


All Articles