Registering Services

Register your classes with ASP.NET Core's service container in Program.cs - as singleton, scoped or transient - and it creates them and hands them to every controller that asks in its constructor.

Updated

Cheat sheet: Registering Services
Category
ASP.NET Core
Level
Journeyman
Tags
"AddScoped", "AddTransient", "AddSingleton", @inject, aspnet-core, c-sharp, Dependency Injection (aspnet-core), Service Lifetime