LINQ in Action roller

troubles with transactions and LINQ inserts

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...
Published Saturday, October 11, 2008 3:03 AM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication