Back to Aspnetcore

KeyedDI

aspnetcore/release-notes/aspnetcore-9/includes/keyedDI.md

latest352 B
Original Source

Middleware supports Keyed DI

Middleware now supports Keyed DI in both the constructor and the Invoke/InvokeAsync method:

:::code language="csharp" source="~/../AspNetCore.Docs.Samples/samples/KeyedServices9/Program.cs" id="snippet_2":::