βRow not found or changedβ assumes that you have the columns that are set for validation. If you have a timestamp ( rowversion ) column, you can use this single value for optimistic concurrency checks, although you still won't know the values, of course. In some cases, you can completely disable concurrency checking (set UpdateCheck="Never" to all interesting columns in dbml).
However, perhaps a simpler option:
_context.ExecuteCommand("delete from [TableName] where [PrimaryKey]={0}", id);
or something like that. Not object oriented, but very efficient. Note that this does not execute in the same transaction as SubmitChanges , unless you manage the transaction yourself, and that it will not verify that exactly 1 row has been deleted. But itβs straight. Also note that the data context will not be aware of this change, so if your data context also has (say) pending updates for this row, it might get confused.
source share