I have this columns
id int primary key,
code int not null
I want to delete all items where code equals to one of the items in a
IEnumerable<int> someEnumerable
One possible way is using iteration. But I wanna do it without explicit iteration (for, foreach). Another way is by doing this:
var result = db.table.Where(a => someEnumerable.Contains(a.code));
db.table.DeleteAllOnSubmit(result);
db.SubmitChanges();
But for me it causes:
An unhandled exception of type 'System.StackOverflowException' occurred in System.Data.Linq.dll