I have an ASP.NET Core 3.1 project. Typically, I register any dependency using the ConfigureServices()
method in the Startup.cs
class.
But, I find myself having to register lots of dependencies and the ConfigureServices()
looks huge! I know I can probably create an extension method of a static method and call it from the ConfigureService()` class, but wondering if there is a better way.
If there a way to register dependencies in the IoC container without having to define them one at a time like this
services.AddScoped<Interface, Class>();
.... 200 lines later
services.AddScoped<ISettings, Settings>()