Coding With Rizwan

Coding With Rizwan

Share

We are custom software development company, we build app, websites, software

08/04/2026

I got over 10 reactions on one of my posts last week! Thanks everyone for your support! πŸŽ‰

30/01/2025

🌟 **Dependency Injection Life Cycles in .NET πŸš€**
Unlock the power of DI with these 3 key life cycles! πŸ’‘

πŸ”΅ **Transient (πŸ”„)**
**When:** Fresh instance *every* time it’s requested.
**Use case:** Stateless services (e.g., sending emails πŸ“§ or logging).
**Example:** `IEmailSenderService` – no memory of past calls!

🟒 **Scoped (πŸ”—)**
**When:** One instance *per request*.
**Use case:** Data handling within a single request (like DB operations πŸ’Ύ).
**Example:** `DbContext` – manages a single transaction per HTTP call.

🟣 **Singleton (🏰)**
**When:** *One instance* for the app’s entire lifetime.
**Use case:** Expensive resources or global state (e.g., caching πŸ—„οΈ).
**Example:** `ICacheService` – keeps data alive as long as the app runs!

πŸ’¬ **Which one do YOU use most often?** Let’s discuss! πŸ‘‡

06/07/2024

The end is beginning

Want your school to be the top-listed School/college in Delhi?
Click here to claim your Sponsored Listing.

Category

Telephone

Address


Regal Building, 69, Connaught Place, New Delhi
Delhi
110001

Opening Hours

Monday 9am - 5pm
Tuesday 9am - 5pm
Wednesday 9am - 5pm
Thursday 9am - 5pm
Friday 9am - 5pm