소스 검색

resolve version conflicts

master
Savorboard 7 년 전
부모
커밋
9f6b0e5d7a
2개의 변경된 파일14개의 추가작업 그리고 6개의 파일을 삭제
  1. +7
    -3
      src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs
  2. +7
    -3
      src/DotNetCore.CAP.PostgreSql/CAP.PostgreSqlCapOptionsExtension.cs

+ 7
- 3
src/DotNetCore.CAP.MySql/CAP.MySqlCapOptionsExtension.cs 파일 보기

@@ -32,9 +32,13 @@ namespace DotNetCore.CAP
{
services.AddSingleton(x =>
{
var dbContext = (DbContext)x.GetService(mysqlOptions.DbContextType);
mysqlOptions.ConnectionString = dbContext.Database.GetDbConnection().ConnectionString;
return mysqlOptions;
using (var scope = x.CreateScope())
{
var provider = scope.ServiceProvider;
var dbContext = (DbContext)provider.GetService(mysqlOptions.DbContextType);
mysqlOptions.ConnectionString = dbContext.Database.GetDbConnection().ConnectionString;
return mysqlOptions;
}
});
}
else


+ 7
- 3
src/DotNetCore.CAP.PostgreSql/CAP.PostgreSqlCapOptionsExtension.cs 파일 보기

@@ -32,9 +32,13 @@ namespace DotNetCore.CAP
{
services.AddSingleton(x =>
{
var dbContext = (DbContext)x.GetService(postgreSqlOptions.DbContextType);
postgreSqlOptions.ConnectionString = dbContext.Database.GetDbConnection().ConnectionString;
return postgreSqlOptions;
using (var scope = x.CreateScope())
{
var provider = scope.ServiceProvider;
var dbContext = (DbContext)provider.GetService(postgreSqlOptions.DbContextType);
postgreSqlOptions.ConnectionString = dbContext.Database.GetDbConnection().ConnectionString;
return postgreSqlOptions;
}
});
}
else


불러오는 중...
취소
저장