I need a way to serialize objects in a transactional context.
Given the following pseudo-code:
transation.Begin()
try{
serializeObj(obj1);
serializeObj(obj2);
serializeObj(obj3);
}
catch(Exception){
transaction.RollBack();
}
transaction.Commit();
I want that, after this code runs, or all the objects had been serialized or none of then had been serialized.
I dont think TransactionScpe gives me this ability. I would prefer some built-in .NET mechanism instead some external library.
Thanks.