I followed the link:
https://docs.microsoft.com/en-us/aspnet/core/mvc/controllers/dependency-injection
and found out how I can use dependency injection for the web API.
As mentioned in the link above, I can use the Startup class (Startup.cs) to inject dependencies inside the API level. But how can you achieve dependency injection for the .NET Core Class library. Below is a screenshot of how I am adding a class library. 
And my project structure

In the project "DataManagement.Repository" I wrote the class "UserRepository", and in the project "DataManagement.Repository.Interfaces" the interface "IUserRepository" is written.
In the project "DataManagement.Business" I wrote the class "UserManager"
class UserManager { private IUserManager _userManager; public UserManager(IUserManager userManager) { _userManager = userManager; } }
As you can see, I'm trying to inject dependencies through the constructor.
But I'm not sure what changes need to be made to include dependency injection inside the .NET Core Class Library (.NET Standard).
dependency-injection asp.net-core visual-studio-2017 .net-core asp.net-core-webapi
Banketeshvar narayan
source share