You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Volo.Abp.AspNetCore.Mvc.ExceptionHandling.AbpExceptionFilter[0]
An exception was thrown while activating Blog.Ling.Application.Services.User.UserService -> Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`3[[Ling.Blog.EntityFrameworkCore.BlogDbContext, Ling.Blog.EntityFrameworkCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Blog.Ling.Domain.Entities.UserEntity, Blog.Ling.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Guid, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Blog.Ling.Application.Services.User.UserService -> Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`3[[Ling.Blog.EntityFrameworkCore.BlogDbContext, Ling.Blog.EntityFrameworkCore, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[Blog.Ling.Domain.Entities.UserEntity, Blog.Ling.Domain, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[System.Guid, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].
---> Autofac.Core.DependencyResolutionException: None of the constructors found on type 'Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`3[Ling.Blog.EntityFrameworkCore.BlogDbContext,Blog.Ling.Domain.Entities.UserEntity,System.Guid]' can be invoked with the available services and parameters:
Cannot resolve parameter 'Volo.Abp.EntityFrameworkCore.IDbContextProvider`1[Ling.Blog.EntityFrameworkCore.BlogDbContext] dbContextProvider' of constructor 'Void .ctor(Volo.Abp.EntityFrameworkCore.IDbContextProvider`1[Ling.Blog.EntityFrameworkCore.BlogDbContext])'.
这是我efcore的模块代码
[DependsOn(typeof(AbpEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreMySQLModule))]
public class BlogEfCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var services = context.Services;
Configure<AbpDbConnectionOptions>(opt =>
{
opt.ConnectionStrings.Default = context.Services.GetConfiguration().GetConnectionString("DefaultConnection");
});
services.AddAbpDbContext<BlogDbContext>(opt =>
{
opt.AddDefaultRepositories(true);
});
}
}
The text was updated successfully, but these errors were encountered:
这是我efcore的模块代码
The text was updated successfully, but these errors were encountered: