- ABP Framework version: v6.0.3
- UI Type: Angular
- Database System: EF Core (SQL Server, PostgreSQL)
- Tiered (for MVC) or Auth Server Separated (for Angular): yes
When I try to reach the Domain Service with the Service Provider in DataSeedContributor, I get the error as follows. How can I use Domain Service methods in the DataSeedContributor class?
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Example.Project.Entities.EntityDomainService. ---> Autofac.Core.DependencyResolutionException: None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Example.Project.Entities.EntityDomainService' can be invoked with the available services and parameters:
5 Answer(s)
- 
    0Share your domain service? It seems it is not registered to DI, perhaps you forgot to extend the DomainServicebase class.
- 
    0Share your domain service? It seems it is not registered to DI, perhaps you forgot to extend the DomainServicebase class.I use Abp's DomainServiceandIDomainServiceclasses as base. There is no problem while the Http API project is running. But the DbMigrator project cannot resolve DI. Because DbMigrator cannot access the Domain layer by default.
- 
    0hi Please share the full error stack and the code of EntityDomainServiceThanks. 
- 
    0hi Please share the full error stack and the code of EntityDomainServiceThanks. Hi I share the codes in a masked form. If you need a clear version and more details, I can send it via e-mail or private ticket. There is no problem when calling the following DomainService from AppService. However, from within DbMigrator _serviceProvider.GetRequiredService< IEntityDomainService>(); When called like this, an error is received.
- 
    0hi liming.ma@volosoft.com 



 
                                