Dependency Injection code samples updated

Dependency Injection code samples updated

With my blog I’ve several articles about dependency injection using Microsoft.Extensions.DependencyInjection. Now I’ve updated the source code of my older … Continue reading Dependency Injection code samples updated

Disposing Injected Services (or: Using Dependency Injection Scopes)

Disposing Injected Services (or: Using Dependency Injection Scopes)

The DI container Microsoft.Extensions.DependencyInjection disposes registered services automatically. It’s just the question when the dispose takes place. Automatic dispose of transient and scoped services happen at the end of a scope. With ASP.NET Core applications, scopes are created with every HTTP request – after the request, services are disposed. This article shows creating and using DI scopes with XAML-based applications. Continue reading Disposing Injected Services (or: Using Dependency Injection Scopes)