Tools Used for development

  • Visual Studio 2019

Long condition statement

In the below code snippet we can see a skill set which is suitable for a job opening in our company with a long condition statement, (i.e, switch statement we have used). Currently we have only two requirements. If we need to add more skills to switch statement then the conditions will keep on increasing.

Replacing condition statement with polymorphism

We will create a Simple Factory design pattern, with class name as SimpleFactory. We will create a skill Dictionary and in constructor add all the skill sets and return the value, as shown in below code snippet,

Implementing lazy loading

In the above code, we have seen how we replace condition statement with Dictionary. Now we will see how we implement lazy loading.

Implementing lazy loading using Lazy class

In the above code, we have seen how we used lazy loading. Now we will see how we implement lazy loading using Lazy class from .Net framework.

Navigating the Seas of Software Development

Navigating the Seas of Software Development

A Comprehensive Guide for Beginners

Geetanjali 10 Jan 2024
Empowering Business Excellence

Empowering Business Excellence

SGR Software Solution's Journey in Digital Transformation

Geetanjali 5 Jan 2024
SOLID with a Simple Example

"SOLID" with a Simple Example

In this article, we will learn the SOLID principle with a simple example. In an interview, this is a common...

Geetanjali 26 Dec 2023
Integrating Auto Mapper in ASP.NET Core

Integrating Auto Mapper in ASP.NET Core

This article demonstrates what Automapper is and how we can integrate Automapper to our ASP.NET...

Geetanjali 24 Dec 2023
Replace Conditional Statements (IF/ELSE Or SWITCH) With Factory

Replace Conditional Statements (IF/ELSE Or SWITCH) With Factory

In this article, we will learn how we can replace long IF/ELSE or long SWITCH (long conditional statement)...

Geetanjali 23 Dec 2023