Scoped Services
4 posts4 contributors
Articles about Scoped Services

Understanding IServiceScopeFactory in .NET: When, Why, and How to Use It (With Real Examples)
IServiceScopeFactory in .NET enables the manual creation of scoped services, allowing singletons and background tasks to safely utilize scoped dependencies. This ensures proper disposal, prevents memory leaks, and maintains DI lifetimes.

Understanding Scope in .NET Core Dependency Injection
Learn how to manage dependencies effectively, understand when and how to use each service type, and optimize your .NET Core applications for better performance and maintainability.

Authorization In Razor Pages ASP.NET Core
Learn how to implement authorization in ASP.NET Core Razor Pages using AddRazorPagesOptions. This guide covers configuring access controls with methods like AuthorizePage, AuthorizeFolder, and AllowAnonymousToPage, including support for areas and Razor Class Libraries.

Dependency Injection and Service Lifetimes in .NET
In this article, I will explain Dependency Injection (DI) is a design pattern that supports the development of loosely coupled code, and it’s also one of the SOLID principles (Dependency Inversion Principle).




