Transactions are used to add the Rollback functionality to calls, Rollback meaning the if an exception or something is thrown your call will not be executed (Commited is the term used for this). Another benefit of using Transactions is that you can group calls together, if somethign happens to one call then all of calls in that group can also be rolled back. This type of feature is particularly useful when taking user input and saving to DB, you may not want anything to get written to the DB is some error occurs on the client. .NET provides us with the System.Transaction assembly, it's not completly straight forward to use but it does hide alot of the underlying complexities. A couple of things I've learned about using System.Transactions or more specifically the System.Transactions.TransactionScope class: The safest way to use it is with the using clause. Always call Commit() before the end of the using. The optional TransactionScopeOptions enum parameter in the constructor de...
Layman explanations of Software coding and configuration techniques. With example code where possible.