trouble:
var daskTeklif = _context.tblDaskTeklifs.SingleOrDefault(dt => dt.teklif_id == TeklifTkID);
daskTeklif.SirketPoliceNo = policeNo;
_context.SubmitChanges();
throws an exception: System.Data.Linq.ChangeConflictException: Row not found or changed.
solution:
creating a new datacontext:
var context = new DataClassesDataContext();
daskTeklif = context.tblDaskTeklifs.SingleOrDefault(dt => dt.teklif_id == TeklifTkID);
daskTeklif.sirketPoliceNo = policeNo;
context.SubmitChanges();
linq - Row not found or changed
Gönderen
pantepember
16 Şubat 2011 Çarşamba