maliming
5 years ago
No known key found for this signature in database
GPG Key ID: 96224957E51C89E
8 changed files with
15 additions and
1 deletions
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/AppNoLayersDatabaseManagementSystemChangeStep.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppNoLayersTemplateBase.cs
-
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs
-
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameDbContextFactory.cs
-
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/EntityFrameworkCore/MyProjectNameEntityFrameworkCoreModule.cs
|
|
|
@ -19,7 +19,6 @@ public class AppNoLayersDatabaseManagementSystemChangeStep : ProjectBuildPipelin |
|
|
|
break; |
|
|
|
|
|
|
|
case DatabaseManagementSystem.PostgreSQL: |
|
|
|
context.Symbols.Add("dbms:PostgreSQL"); |
|
|
|
ChangeEntityFrameworkCoreDependency(context, "Volo.Abp.EntityFrameworkCore.PostgreSql", |
|
|
|
"Volo.Abp.EntityFrameworkCore.PostgreSql", |
|
|
|
"AbpEntityFrameworkCorePostgreSqlModule"); |
|
|
|
|
|
|
|
@ -41,6 +41,11 @@ public abstract class AppNoLayersTemplateBase : AppTemplateBase |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
if (context.BuildArgs.DatabaseManagementSystem == DatabaseManagementSystem.PostgreSQL) |
|
|
|
{ |
|
|
|
context.Symbols.Add("dbms:PostgreSQL"); |
|
|
|
} |
|
|
|
|
|
|
|
switch (context.BuildArgs.UiFramework) |
|
|
|
{ |
|
|
|
case UiFramework.Angular: |
|
|
|
|
|
|
|
@ -103,6 +103,11 @@ public abstract class AppTemplateBase : TemplateInfo |
|
|
|
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.MongoDB")); |
|
|
|
steps.Add(new RemoveProjectFromSolutionStep("MyCompanyName.MyProjectName.MongoDB.Tests", projectFolderPath: "/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests")); |
|
|
|
} |
|
|
|
|
|
|
|
if (context.BuildArgs.DatabaseManagementSystem == DatabaseManagementSystem.PostgreSQL) |
|
|
|
{ |
|
|
|
context.Symbols.Add("dbms:PostgreSQL"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
protected void DeleteUnrelatedProjects(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) |
|
|
|
|
|
|
|
@ -12,6 +12,7 @@ public class Program |
|
|
|
//<TEMPLATE-REMOVE IF-NOT='dbms:PostgreSQL'>
|
|
|
|
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
|
|
|
|
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); |
|
|
|
|
|
|
|
//</TEMPLATE-REMOVE>
|
|
|
|
var loggerConfiguration = new LoggerConfiguration() |
|
|
|
#if DEBUG
|
|
|
|
|
|
|
|
@ -11,6 +11,7 @@ public class Program |
|
|
|
//<TEMPLATE-REMOVE IF-NOT='dbms:PostgreSQL'>
|
|
|
|
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
|
|
|
|
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); |
|
|
|
|
|
|
|
//</TEMPLATE-REMOVE>
|
|
|
|
var loggerConfiguration = new LoggerConfiguration() |
|
|
|
#if DEBUG
|
|
|
|
|
|
|
|
@ -12,6 +12,7 @@ public class Program |
|
|
|
//<TEMPLATE-REMOVE IF-NOT='dbms:PostgreSQL'>
|
|
|
|
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
|
|
|
|
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); |
|
|
|
|
|
|
|
//</TEMPLATE-REMOVE>
|
|
|
|
var loggerConfiguration = new LoggerConfiguration() |
|
|
|
#if DEBUG
|
|
|
|
|
|
|
|
@ -14,6 +14,7 @@ public class MyProjectNameDbContextFactory : IDesignTimeDbContextFactory<MyProje |
|
|
|
//<TEMPLATE-REMOVE IF-NOT='dbms:PostgreSQL'>
|
|
|
|
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
|
|
|
|
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); |
|
|
|
|
|
|
|
//</TEMPLATE-REMOVE>
|
|
|
|
MyProjectNameEfCoreEntityExtensionMappings.Configure(); |
|
|
|
|
|
|
|
|
|
|
|
@ -32,6 +32,7 @@ public class MyProjectNameEntityFrameworkCoreModule : AbpModule |
|
|
|
//<TEMPLATE-REMOVE IF-NOT='dbms:PostgreSQL'>
|
|
|
|
// https://www.npgsql.org/efcore/release-notes/6.0.html#opting-out-of-the-new-timestamp-mapping-logic
|
|
|
|
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); |
|
|
|
|
|
|
|
//</TEMPLATE-REMOVE>
|
|
|
|
MyProjectNameEfCoreEntityExtensionMappings.Configure(); |
|
|
|
} |
|
|
|
|