I'm trying to solve the classic problem where I have record I want to insert in a table, then the next insert depends on the identity of the first. That is, I have an Address Table and a CompanyAddress Table. I first insert into the address table, then, taking the identity column from that insert, I insert in my CompanyAddress Table. I want to have these inserts in a transaction so if second one fails, orphaned address record gets rolled back. Problem is, if I call db.SubmitChanges();, that starts
Read More...