DICOM (Digital Imaging and Communication in Medicine) is probably the most common standard used for storage and exchange of Medical Images. This article provides a basic introduction on reading a Dicom File using C#. The basic unit of a Dicom file is called an Element. Dicom Elements consists of 4 components 1. Tag 2. Value … Continue reading An Introduction into Dicom using Fellow Oak
Category: Frameworks & Libraries
Development using different Frameworks and Libraries
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”
Specifying singular table names
Entity Framework usually generates Tables with plural names. For example, a Student class would generate a table Students. This could be a little inconvenience for teams who insists on plural names. The solution is to override the 'OnModelCreating' Method to remove the plural features. This would ensure plural names are used in every concerned Context. … Continue reading Specifying singular table names
Composite Primary Key using Data Annotations
When developing domain classes in Entity Framework using Code First Approach, the default code conventions creates a primary key of a property named "ID" or <ClassName>ID. But if you wanted to use another property as your primary key , you can use DataAnnotations and decorate the property using "Key" attribute. What is more interesting is … Continue reading Composite Primary Key using Data Annotations