* I have two tables
domain(id,code,name) branch(id,domain_id,address....) I using transaction to insert two tables concurrency. But when insert to second table failed I check my DB first table data still inserted.
* Here is my code:
using (var sharedConnectionScope = new SharedDbConnectionScope())
{
using (var ts = new TransactionScope())
{
Domain domain = getDomain();
Branch branch = getBranch();
domain.Save();
branch.DomainId = domain.Id;
branch.Save();
ts.Complete();
}
}
* Could anybody solve this problem for me? Thanks advanced
