Lambda Expression in C# with Examples

A lambda expression is a short way to describe an anonymous function in C#. The abbreviated syntax of Lambda Expression helps to create Delegates and expressions. In this article, we will see Lambda Expression in C# with examples. A lambda function can be used to quickly define a method and then pass it as an … Read more

IQueryable Vs IEnumerable in C#

Both IQueryable and IEnumerable are interfaces in .NET that represent a collection of objects. However, they have some important differences in how they work and when to use them. Let’s begin. What is IEnumerable? IEnumerable lets you iterate through a collection of objects. It only has one method that is defined: GetEnumerator(). This method returns … Read more

The Key Differences Between Onion Architecture and Clean Architecture

Onion Architecture and Clean Architecture both are used to provide a standard architecture to the software. These architectures play a key role when we build large and complex projects which require regular enhancements.In this article, we will know about Onion architecture and Clean architecture in detail. Also, we will see a basic example of .Net … Read more

Tuple in C# with Example

In this article, we will know about Tuple in C#. What is Tuple? Tuple is a lightweight data structure that may contain different data types. It is introduced in C# 7.0. Syntax to write Tuple Following code snippet is used to create a tuple with 4 elements of different data types. Create method of Tuple … Read more

5 new features in C# 10

In this article, we will look into 5 new features in C# 10. .NET 6 was released on November 8, 2021, and C# 10 works with .NET 6. C# 10 new features C# 10 introduces below new features. 1. Record Structs The keyword Record was introduced with C# 9. Record is used to define reference … Read more

SOLID Principles in C#

The SOLID principles are a standard software development practice that should be followed in all software applications which is using Object-Oriented Programming. They set the norm of how to write a program with clean architecture. SOLID principles in C# helps to write code that is easy to test, easy to maintain and easy to extend. … Read more

Factory Design Pattern

In this article, we will understand the Factory Design Pattern with C# code. It is one of the most popular design patterns used in the programming world. There are mainly 3 types of design patterns which are sub-divided into multiple patterns. Factory Design Pattern comes under Creational Pattern and the other 2 are Structural Pattern … Read more

What is AutoMapper in C#?

AutoMapper is used to map data between two objects. In this blog, we will see how to use AutoMapper in our application. Let’s demonstrate the use of Automapper by an example. Suppose we have a class called Employee with 2 properties in it – Name and City class Employee     {         public string Name … Read more