Browse Source
Merge pull request #4766 from abpframework/maliming/UnifiedMigration
Make app template DbContextFactory use migrator project's appsettings.json
pull/4783/head
Halil İbrahim Kalkan
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
8 additions and
5 deletions
-
modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj
-
modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj
-
modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/MyProjectNameMigrationsDbContextFactory.cs
|
|
@ -3,7 +3,7 @@ |
|
|
<Import Project="..\..\..\..\configureawait.props" /> |
|
|
<Import Project="..\..\..\..\configureawait.props" /> |
|
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
<PropertyGroup> |
|
|
<TargetFramework>netstandard2.0</TargetFramework> |
|
|
<TargetFramework>netcoreapp3.1</TargetFramework> |
|
|
</PropertyGroup> |
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
|
<ItemGroup> |
|
|
<ItemGroup> |
|
|
@ -14,4 +14,9 @@ |
|
|
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" /> |
|
|
<ProjectReference Include="..\..\..\..\modules\identity\src\Volo.Abp.Identity.EntityFrameworkCore\Volo.Abp.Identity.EntityFrameworkCore.csproj" /> |
|
|
</ItemGroup> |
|
|
</ItemGroup> |
|
|
|
|
|
|
|
|
|
|
|
<ItemGroup> |
|
|
|
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.5" /> |
|
|
|
|
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.5" /> |
|
|
|
|
|
</ItemGroup> |
|
|
|
|
|
|
|
|
</Project> |
|
|
</Project> |
|
|
|
|
|
@ -18,8 +18,6 @@ |
|
|
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" /> |
|
|
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" /> |
|
|
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> |
|
|
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> |
|
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.3.1" /> |
|
|
<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> |
|
|
|
|
|
|
|
|
<ItemGroup> |
|
|
<ItemGroup> |
|
|
|
|
|
@ -3,7 +3,7 @@ |
|
|
<Import Project="..\..\..\..\configureawait.props" /> |
|
|
<Import Project="..\..\..\..\configureawait.props" /> |
|
|
|
|
|
|
|
|
<PropertyGroup> |
|
|
<PropertyGroup> |
|
|
<TargetFramework>netstandard2.0</TargetFramework> |
|
|
<TargetFramework>netcoreapp3.1</TargetFramework> |
|
|
<RootNamespace /> |
|
|
<RootNamespace /> |
|
|
</PropertyGroup> |
|
|
</PropertyGroup> |
|
|
|
|
|
|
|
|
|
|
|
@ -24,7 +24,7 @@ namespace MyCompanyName.MyProjectName.EntityFrameworkCore |
|
|
private static IConfigurationRoot BuildConfiguration() |
|
|
private static IConfigurationRoot BuildConfiguration() |
|
|
{ |
|
|
{ |
|
|
var builder = new ConfigurationBuilder() |
|
|
var builder = new ConfigurationBuilder() |
|
|
.SetBasePath(Directory.GetCurrentDirectory()) |
|
|
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../MyCompanyName.MyProjectName.DbMigrator/")) |
|
|
.AddJsonFile("appsettings.json", optional: false); |
|
|
.AddJsonFile("appsettings.json", optional: false); |
|
|
|
|
|
|
|
|
return builder.Build(); |
|
|
return builder.Build(); |
|
|
|