Skip to content

Glossary: ASP.NET Core

Constructor injection

DI passes a class's dependencies in through its constructor, for example `ShopDb` receiving its options. It works for any registered class, not only handlers.

Where the book teaches it

Related terms

Dependency injectionPrimary constructor