Ao iniciar o projeto recebo o seguinte erro:
An error occurred while starting the application.
AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Alura.LeilaoOnline.WebApp.Dados.ILeilaoDao Lifetime: Transient ImplementationType: Alura.LeilaoOnline.WebApp.Dados.EfCore.LeilaoDaoComEfCore': Unable to resolve service for type 'Alura.LeilaoOnline.WebApp.Dados.EfCore.AppDbContext' while attempting to activate 'Alura.LeilaoOnline.WebApp.Dados.EfCore.LeilaoDaoComEfCore'.)
Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(IEnumerable<ServiceDescriptor> serviceDescriptors, ServiceProviderOptions options)
InvalidOperationException: Error while validating the service descriptor 'ServiceType: Alura.LeilaoOnline.WebApp.Dados.ILeilaoDao Lifetime: Transient ImplementationType: Alura.LeilaoOnline.WebApp.Dados.EfCore.LeilaoDaoComEfCore': Unable to resolve service for type 'Alura.LeilaoOnline.WebApp.Dados.EfCore.AppDbContext' while attempting to activate 'Alura.LeilaoOnline.WebApp.Dados.EfCore.LeilaoDaoComEfCore'.
Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.ValidateService(ServiceDescriptor descriptor)
AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Alura.LeilaoOnline.WebApp.Dados.ILeilaoDao Lifetime: Transient ImplementationType: Alura.LeilaoOnline.WebApp.Dados.EfCore.LeilaoDaoComEfCore': Unable to resolve service for type 'Alura.LeilaoOnline.WebApp.Dados.EfCore.AppDbContext' while attempting to activate 'Alura.LeilaoOnline.WebApp.Dados.EfCore.LeilaoDaoComEfCore'.)
Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(IEnumerable<ServiceDescriptor> serviceDescriptors, ServiceProviderOptions options)
Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory.CreateServiceProvider(IServiceCollection containerBuilder)
Microsoft.Extensions.Hosting.Internal.ServiceFactoryAdapter<TContainerBuilder>.CreateServiceProvider(object containerBuilder)
Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
Microsoft.Extensions.Hosting.HostBuilder.Build()
Alura.LeilaoOnline.WebApp.Program.Main(string[] args) in Program.cs
+
CreateHostBuilder(args).Build().Run();
Show raw exception details
InvalidOperationException: Error while validating the service descriptor 'ServiceType: Alura.LeilaoOnline.WebApp.Dados.ILeilaoDao Lifetime: Transient ImplementationType: Alura.LeilaoOnline.WebApp.Dados.EfCore.LeilaoDaoComEfCore': Unable to resolve service for type 'Alura.LeilaoOnline.WebApp.Dados.EfCore.AppDbContext' while attempting to activate 'Alura.LeilaoOnline.WebApp.Dados.EfCore.LeilaoDaoComEfCore'.
Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.ValidateService(ServiceDescriptor descriptor)
Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(IEnumerable<ServiceDescriptor> serviceDescriptors, ServiceProviderOptions options)
Show raw exception details
.NET Core 3.1.32 X64 v4.0.0.0 | Microsoft.AspNetCore.Hosting version 3.1.32+3eeb12e106b9e913c3a4dec1a7d16da7b74149eb | Microsoft Windows 10.0.19045 | Need help?