Using Dependency Injection with .NET Core Class Library (.NET Standard)
You don’t have to do anything in your class library. Only the main application has a composition root (earliest point in an application lifecycle you can set up your object graph). This happens in Startup.cs in your ASP.NET Core application. There you also register your dependencies: services.AddScoped<IUserManager,UserManager>(); That’s it. Class libraries don’t have a composition … Read more