Merge pull request #4766 from abpframework/maliming/UnifiedMigration

Make app template DbContextFactory use migrator project's appsettings.json
pull/4783/head
Halil İbrahim Kalkan 5 years ago committed by GitHub
commit 64d22355f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,7 +3,7 @@
<Import Project="..\..\..\..\configureawait.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
@ -14,4 +14,9 @@
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5" />
</ItemGroup>
</Project>

@ -18,8 +18,6 @@
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.3.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5" />
</ItemGroup>
<ItemGroup>

@ -3,7 +3,7 @@
<Import Project="..\..\..\..\configureawait.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace />
</PropertyGroup>

@ -24,7 +24,7 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../MyCompanyName.MyProjectName.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();

Loading…
Cancel
Save