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
CSharp
C#3.0
Video : Getting started with the Automapper in C-Sharp
This video will help you in getting started with the Automapper. Please give feedback in comment to improve further https://www.youtube.com/watch?v=KJ_sM8WdDGM&feature=youtu.be
Keep your code DRY
Other day my Boss was reviewing the code written by me. He had a feedback, keep the code DRY. It was great feedback, and I thought why not to share with you that what does DRY mean? DRY stands for Do not Repeat Yourself. To understand it better let is consider below code snippet: I … Continue reading Keep your code DRY
Understanding IEnumerable and IQueryable in C#
I see developers are not that confident about usage of the mentioned interfaces. In this post, I am going to discuss basic differences among IEnumerable and IQueryable and in which scenario to use what
The call is ambiguous between the following methods in C#
the call is ambiguous between the following methods in C# can be resolved as easily as given discussed above.
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#
Video: What is Extension Method in C-sharp
In this video you will learn about Extension Method in C-sharp http://www.youtube.com/watch?v=Xh0knk90tqM&feature=youtu.be
Video: is and as operator in C-sharp
In this video you will learn about is and as operator in C-sharp http://www.youtube.com/watch?v=fsukGhg1yJk&feature=youtu.be
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