I'm using the following LINQ-statement to update a table-entry with the current date/time:
MembershipClassesDataContext db = new MembershipClassesDataContext();
var tmp = db.drun_addqol_2_usrs.SingleOrDefault(y => !y.done.HasValue && y.UserId.Equals(Membership.GetUser().ProviderUserKey.ToString()));
tmp.done = DateTime.Now;
// at this point, tmp.done has the correct value!
// also the entry isn't null because I got the correct ID with tmp.UserId
// But db.GetChangeSet().Count is zero (0), so the value of "done" is changed but not commited to the ChangeSet?!
db.SubmitChanges();
"done" is a column with type DateTime and after the above query it shouldn't be null but should contain the actual date / time. But... it doesn't update and the value is still null.
Any ideas where my mistake is?
Thanks in advance!