Service lifetimes in ASP.NET Core

Posted on Aug 16, 2025 in C#/ ASP.NET

Service lifetimes in ASP.NET Core (Scoped, Transient, Singleton) and how they behave during an HTTP request. Let me break it down clearly. Service Lifetimes, ASP.NET Core has three main lifetimes when you register services in the DI container: Lifetime Description Behavior Transient services.AddTransient<T>() A new instance is created every time the service is requested from […]

Read More

New Feature in .NET 8

Posted on Aug 6, 2025 in C#/ ASP.NET

With the release of .NET 8, Microsoft continues to evolve the C# language and developer experience by introducing Primary Constructors for Classes and Structs β€” a long-awaited feature that brings more conciseness and clarity to object initialization. Whether you’re building APIs, domain models, or simple DTOs, primary constructors can make your code more readable and […]

Read More