Cannot resolve scoped service Mango.Services.Identity.Initializer.IDbInitializer from root provider

80

Cannot resolve scoped service 'Mango.Services.Identity.Initializer.IDbInitializer' from root provider -

https://stackoverflow.com/questions/48590579/cannot-resolve-scoped-service-from-root-provider-net-core-2
using (var scope = _serviceProvider.CreateScope()) {
    var _emailRepository = scope.ServiceProvider.GetRequiredService<IEmailRepository>();

    //do your stuff....
}

Comments

Submit
0 Comments