Does anybody know how to find the number of rows affected AFTER I have submitted changes to the data context in LINQ to SQL?
At first I was doing something like this:
Using db as New MyDataContext()
db.Users.Attach(modifiedUser, True)
db.SubmitChanges()
Dim rowsUpdated As Integer = db.GetChangeSet().Updates.Count
End Using
I have since figured out that this doesn't work and that
db.GetChangeSet().Updates.Count
Only tells you how many updates there will be BEFORE you call SubmitChanges().
Is there anyway to find out how many rows have actually been affected?