当我将ContextDbContext和DomainDbContext添加到ContextPool时,EF Core 2.0出错

时间:2017-08-30 15:59:54

标签: c# entity-framework asp.net-core asp.net-core-2.0 entity-framework-core

当我这样做时

            services.AddDbContextPool<ApplicationDbContext>(options =>
            options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));

        services.AddDbContextPool<DomainDbContext >(options =>
            options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));

我收到此错误

  

ArgumentException:类型的表达式   &#39; {Microsoft.EntityFrameworkCore.DbContextOptions {1}} 1 [ApplicationDbContext]&#39;   参数名称:arguments [0]

0 个答案:

没有答案