Have you ended up in a situation wherein, you know the Column Name but you have no clue about the Table Name ? I recently came across the situation and following is one query which help me out of the situation.The Query is for Firebird Database.
Month: May 2015
Rethrow Exception
CA2200 : Rethrow to preserve stack details. That's one recommendation that as a developer you might have seen when running Code Analysis on your solution. So what does it mean ? What does the guilty code looks like and what is the correct way to throw exceptions. Lets start with incorrect code first. Considering following … Continue reading Rethrow Exception
Mocking IDispossible with “Using”
Mocking objects is integral part of Unit Testing. The nucleus of Mocking is Dependency Injection, which allows us to inject Mock object into the code. But what happens when programmer has used the "Using" keyword ? For Example, This makes it difficult to mock DbCommand. The solution lies in deploying Factory Pattern to create our CustomDbCommand. For … Continue reading Mocking IDispossible with “Using”