Using AutoMapper : Getting Started

Read full article on Falafel blog I have often seen developers use the LINQ SELECT statement to create a new instance of one class from an existing instance of another class. There are many scenarios when you may have to do this, for example: Creating the domain class instance from the entity class instance Creating … Continue reading Using AutoMapper : Getting Started

Convert List to List using ConvertAll in C#

I see many developers convert one list to another list using foreach. It is ok and get the job done but there is better way to convert one list to another list using ConvertAll(); Just to explain you scenario better, let us assume you got two classes as below. InternalStudent class is representing Student class … Continue reading Convert List to List using ConvertAll in C#

Single Responsibility Principle in C-Sharp: Simplified

Let us start with understanding what is SRP? Single Responsibility Principle says every class should have single responsibility and all the responsibility should be encapsulated in the class. To explain it further assume you are creating a creating class to Calculate Salary. Now if you have two methods in class like below. Usually we can … Continue reading Single Responsibility Principle in C-Sharp: Simplified

Evolution of C Sharp Language: Picture Blog

I was working on something and suddenly a mail popped up. I did not know the sender but I found he/she was a job aspirant. I found him/her very impatient and gist of his/her mail was, "Sir tomorrow I got a job interview. Could you please help me with different versions of C Sharp with … Continue reading Evolution of C Sharp Language: Picture Blog