Using Dependency Injection with .NET Core
When working with .NET Core, the default dependency injection container is Microsoft.Extensions.DependencyInjection.
Previously, when using Unity as an IOC container, classes could be auto registered using convention over configuration.
However, Microsoft.Extensions.DependencyInjection does not have this feature as an option.
Before replacing this option with a 3rd party IOC solution, is there a reason why the standard Dependency Injection framework does not have autoregistration as a feature? Is autoregistration now considered bad practice? If so, why is it better to specify everything explicitly?
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.AddSingleton<IMyService, MyService>();
}