Transactions . . .
Cheese Pairing for this Post: 1-year-old, Cave-Aged Gruyere [this is a great one that you can really enjoy every once in a while under the right circumstances] So, this week a user story was assigned to me that said something like, "Make sure that we don't save and of the Order data if we can't save ALL the Order data." Immediately, I thought, "Sounds like time to add some transactional support to our (custom) repositories." So there I am adding some tests to the repositories solution that assert that I have some infrastructure in place to track all of the database connections, etc, when one of my co-workers says, "Why don't you just use TransactionScope?" This was new to me, so here is what I learned: TransactionScope is a class built on the Microsoft Distributed Transaction Coordinator. It basically wraps up all that hard work of tracking and committing or rolling back transactions across multiple connections into an easy to use interfac...