nested sell linq sql


i need assistance realizing definitely challenging business explanation operates tables executes definitely few sql commands. however i wish certain information left incosistent state impulse i don't fortitude need nested transactions. i wrote rudimentary pseudo-code illustrates unfolding identical i wish accomplish:



dictionary<int, bool> opsucceeded = new dictionary<int, bool> ();

for (int i = 0; i < 10; i++)
{
try
{
// operation contingency atomic
operation(dbcontext, i);

// dedicate (?)

opsucceeded[i] = true;
}
catch
{
// ignore
}
}

try
{
// operation contingency know operation(i) succeeded;
// also contingency atomic
finaloperation(dbcontext, opsucceeded);

// dedicate all
}
catch
{
// rollback finaloperation operation(i) where opsucceeded[i] == true
}


the biggest problem me is: pledge finaloperation fails, operations operation(i) succeeded rolled back? note i also means replace failures unparalleled operation(i).



is illusory grasp controlling nested transactionscope objects - proceed such problem?



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?