Posts

Showing posts from May, 2021

Writing code is a mind and time-consuming process, a short story to prove

 Two days ago, while I’m trying to test a Customer module that I had codded, testing some data insertion from my code, I found out my insertion code on exception does not roll-back the insertion, I use to make this kind of transaction handling  at the DBMS on the sorted procedures, but I decided to make this from my code this time, so I searched that, and on C# .net you can use what called TransactionScope , which I implemented successfully, I wasted another hour on reading about the other types of transactions that available on .net framework, implicit and explicit , on one method or through the whole methods and across threads, “I hated threads!” I said, “Let's check about it … no! let’s get focused”.  So I continued my tests and based on some new requirements that I just remembered to do, I have to add forging a key relationship between the Customer table and Company table, that each customer MUST be linked to a company that s/he worked at, this is a simple change, right? The