Skip to content

Commit

Permalink
feat: 调整模板
Browse files Browse the repository at this point in the history
feat: 调整模板
  • Loading branch information
WangJunZzz authored Feb 12, 2025
2 parents 83828ae + e83e4e7 commit e3bb790
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion templates/pro-module/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<Import Project="Directory.Build.Microsoft.targets"/>
<Import Project="Directory.Build.Volo.targets"/>

<Import Project="Directory.Build.Lion.targets"/>

<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private void ConfigureCache(ServiceConfigurationContext context)

private void ConfigureDB()
{
Configure<AbpDbContextOptions>(options => { options.UseMySQL(); });
Configure<AbpDbContextOptions>(options => { options.UseMySQL(builder => { builder.TranslateParameterizedCollectionsToConstants(); }); });
}

/// <summary>
Expand Down
3 changes: 2 additions & 1 deletion templates/pro-nuget/service/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<Import Project="Directory.Build.Microsoft.targets"/>
<Import Project="Directory.Build.Volo.targets"/>

<Import Project="Directory.Build.Lion.targets"/>

<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MyCompanyName.MyProjectName
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0.Solution Items", "0.Solution Items", "{2C4A6DB8-8D9E-42E6-B7C3-1EDB7B3DE22E}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
NuGet.Config = NuGet.Config
Directory.Build.Microsoft.targets = Directory.Build.Microsoft.targets
Directory.Build.targets = Directory.Build.targets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ public override void ConfigureServices(ServiceConfigurationContext context)
});
Configure<AbpDbContextOptions>(options =>
{
/* The main point to change your DBMS.
* See also MyProjectNameMigrationsDbContextFactory for EF Core tooling. */
options.UseMySQL();
options.UseMySQL(builder =>
{
builder.TranslateParameterizedCollectionsToConstants();
});
});
}
}
Expand Down

0 comments on commit e3bb790

Please sign in to comment.