When I use a using clause on an object should I dispose this object before exiting the using block?
using (var transaction = TransactionUtils.CreateTransactionScope())
{
try
{
_entity.Save(entity);
transaction.Complete();
}
catch // or better finally
{
transaction.Dispose(); // Is this try-catch usefull?
throw;
}
}
Note : A similar question has already been asked but I find the example and the answers strange.