Browse Source

feat(微服务模板): 添加 Abp 框架微服务模板项目文件 PackageName.CompanyName.ProjectName.csproj

pull/1067/head^2^2
feijie 1 year ago
parent
commit
77bacd2f4c
  1. 30
      aspnet-core/templates/micro/PackageName.CompanyName.ProjectName.csproj
  2. 116
      aspnet-core/templates/micro/content/.template.config/template.json
  3. 5
      aspnet-core/templates/micro/content/.template.config/template.zh-Hans.json
  4. 13
      aspnet-core/templates/micro/content/Directory.Build.props
  5. 490
      aspnet-core/templates/micro/content/Directory.Packages.props
  6. 12
      aspnet-core/templates/micro/content/NuGet.Config
  7. 129
      aspnet-core/templates/micro/content/README.md
  8. 129
      aspnet-core/templates/micro/content/README.zh-CN.md
  9. 38
      aspnet-core/templates/micro/content/common.props
  10. 9
      aspnet-core/templates/micro/content/configureawait.props
  11. 53
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/DbMigratorHostedService.cs
  12. 3
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/FodyWeavers.xml
  13. 30
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/FodyWeavers.xsd
  14. 42
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/PackageName.CompanyName.ProjectName.DbMigrator.csproj
  15. 13
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/PackageNameCompanyNameProjectNameDbMigratorModule.cs
  16. 40
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/Program.cs
  17. 147
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/appsettings.Development.json
  18. 80
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/appsettings.json
  19. 12
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/Controllers/HomeController.cs
  20. 57
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/Dockerfile
  21. 76
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/PackageName.CompanyName.ProjectName.HttpApi.Host.csproj
  22. 65
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/Program.cs
  23. 445
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.Configure.cs
  24. 127
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs
  25. 28
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/Properties/launchSettings.json
  26. 31
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/TenantHeaderParamter.cs
  27. 153
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json
  28. 88
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/appsettings.json
  29. 1
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/dapr.sh
  30. 2
      aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/generate-proxy.sh
  31. 3
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/FodyWeavers.xml
  32. 30
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/FodyWeavers.xsd
  33. 27
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName.CompanyName.ProjectName.Application.Contracts.csproj
  34. 18
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/Features/ProjectNameFeatureDefinitionProvider.cs
  35. 6
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/Features/ProjectNameFeatureNames.cs
  36. 10
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/IProjectNameDynamicQueryableAppService.cs
  37. 22
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/Permissions/ProjectNamePermissionDefinitionProvider.cs
  38. 8
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/Permissions/ProjectNamePermissions.cs
  39. 17
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/ProjectNameApplicationContractsModule.cs
  40. 7
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/ProjectNameRemoteServiceConsts.cs
  41. 3
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/FodyWeavers.xml
  42. 30
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/FodyWeavers.xsd
  43. 26
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/PackageName.CompanyName.ProjectName.Application.csproj
  44. 13
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/PackageName/CompanyName/ProjectName/ProjectNameAppServiceBase.cs
  45. 10
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/PackageName/CompanyName/ProjectName/ProjectNameApplicationMapperProfile.cs
  46. 27
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/PackageName/CompanyName/ProjectName/ProjectNameApplicationModule.cs
  47. 19
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/PackageName/CompanyName/ProjectName/ProjectNameDynamicQueryableAppServiceBase.cs
  48. 32
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/System/Linq/Expressions/ExpressionFuncExtensions.cs
  49. 3
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Dapr.Client/FodyWeavers.xml
  50. 30
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Dapr.Client/FodyWeavers.xsd
  51. 19
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Dapr.Client/PackageName.CompanyName.ProjectName.Dapr.Client.csproj
  52. 18
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Dapr.Client/PackageName/CompanyName/ProjectName/ProjectNameDaprClientModule.cs
  53. 3
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/FodyWeavers.xml
  54. 30
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/FodyWeavers.xsd
  55. 30
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName.CompanyName.ProjectName.Domain.Shared.csproj
  56. 8
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/Localization/ProjectNameResource.cs
  57. 8
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/Localization/Resources/en.json
  58. 8
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/Localization/Resources/zh-Hans.json
  59. 16
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/ObjectExtending/ProjectNameModuleExtensionConfiguration.cs
  60. 19
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/ObjectExtending/ProjectNameModuleExtensionConfigurationDictionaryExtensions.cs
  61. 11
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/ObjectExtending/ProjectNameModuleExtensionConsts.cs
  62. 32
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/ProjectNameDomainSharedModule.cs
  63. 6
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/ProjectNameErrorCodes.cs
  64. 3
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/FodyWeavers.xml
  65. 30
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/FodyWeavers.xsd
  66. 27
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName.CompanyName.ProjectName.Domain.csproj
  67. 54
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/IProjectNameBasicRepository.cs
  68. 11
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/ProjectNameDbProperties.cs
  69. 11
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/ProjectNameDomainMapperProfile.cs
  70. 45
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/ProjectNameDomainModule.cs
  71. 10
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/Settings/ProjectNameSettingDefinitionProvider.cs
  72. 6
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/Settings/ProjectNameSettings.cs
  73. 32
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/System/Linq/Expressions/ExpressionFuncExtensions.cs
  74. 3
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/FodyWeavers.xml
  75. 30
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/FodyWeavers.xsd
  76. 37
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName.CompanyName.ProjectName.EntityFrameworkCore.csproj
  77. 77
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/EfCoreProjectNameRepository.cs
  78. 9
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/IProjectNameDbContext.cs
  79. 21
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbContext.cs
  80. 49
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbContextFactory.cs
  81. 21
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbContextModelCreatingExtensions.cs
  82. 36
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbMigrationEventHandler.cs
  83. 58
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbMigrationService.cs
  84. 6
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameEfCoreQueryableExtensions.cs
  85. 76
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameEntityFrameworkCoreModule.cs
  86. 17
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameModelBuilderConfigurationOptions.cs
  87. 3
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi.Client/FodyWeavers.xml
  88. 30
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi.Client/FodyWeavers.xsd
  89. 24
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi.Client/PackageName.CompanyName.ProjectName.HttpApi.Client.csproj
  90. 18
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi.Client/PackageName/CompanyName/ProjectName/ProjectNameHttpApiClientModule.cs
  91. 3
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/FodyWeavers.xml
  92. 30
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/FodyWeavers.xsd
  93. 25
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/PackageName.CompanyName.ProjectName.HttpApi.csproj
  94. 12
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/PackageName/CompanyName/ProjectName/ProjectNameControllerBase.cs
  95. 17
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/PackageName/CompanyName/ProjectName/ProjectNameDynamicQueryableControllerBase.cs
  96. 42
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/PackageName/CompanyName/ProjectName/ProjectNameHttpApiModule.cs
  97. 3
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.SettingManagement/FodyWeavers.xml
  98. 30
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.SettingManagement/FodyWeavers.xsd
  99. 27
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.SettingManagement/PackageName.CompanyName.ProjectName.SettingManagement.csproj
  100. 7
      aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.SettingManagement/PackageName/CompanyName/ProjectName/SettingManagement/IProjectNameSettingAppService.cs

30
aspnet-core/templates/micro/PackageName.CompanyName.ProjectName.csproj

@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <!-- 或其他适合的框架 -->
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>LINGYUN.Abp.MicroService.Templates</PackageId>
<Version>8.3.0</Version>
<Authors>colin.in@foxmail.com</Authors>
<Description>Abp framework micro-service template</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://github.com/colinin/abp-next-admin</PackageProjectUrl>
<PackageTags>micro webapi cloud</PackageTags>
<PackageType>Template</PackageType>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/colinin/abp-next-admin</RepositoryUrl>
<DevelopmentDependency>true</DevelopmentDependency>
<IsPackable>true</IsPackable>
<IsShipping>true</IsShipping>
<IsShippingPackage>true</IsShippingPackage>
<IncludeBuildOutput>False</IncludeBuildOutput>
<IncludeSource>False</IncludeSource>
</PropertyGroup>
<ItemGroup>
<Content Include="content\**" Exclude="**/bin/**;**/obj/**;**/LocalNuget/**;**/.vs/**;**/.vscode/**;">
<Pack>true</Pack>
<PackagePath>content</PackagePath>
</Content>
</ItemGroup>
</Project>

116
aspnet-core/templates/micro/content/.template.config/template.json

@ -0,0 +1,116 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "colin.in@foxmail.com",
"classifications": ["micro", "webapi", "cloud"],
"name": "LINGYUN.Abp.MicroService",
"identity": "LINGYUN.Abp.MicroService",
"description": "Abp framework micro-service template",
"groupIdentity": "LINGYUN.Abp.Application",
"shortName": "lam",
"tags": {
"language": "C#",
"type": "project"
},
"sources": [
{
"modifiers": [
{
"exclude": [
"**/[Bb]in/**",
"**/[Oo]bj/**",
"**/[Ll]ocalNuget/**",
".template.config/**/*",
".vs/**/*",
"**/host/PackageName.CompanyName.ProjectName.AIO.Host/**"
]
}
]
}
],
"sourceName": "ProjectName",
"preferNameDirectory": true,
"symbols": {
"AuthenticationScheme": {
"type": "parameter",
"description": "Authentication Scheme",
"datatype": "choice",
"defaultValue": "IdentityServer4",
"isRequired": false,
"choices": [
{
"choice": "IdentityServer4",
"description": "IdentityServer4"
},
{
"choice": "OpenIddict",
"description": "OpenIddict"
}
]
},
"DatabaseManagement": {
"type": "parameter",
"description": "Database Management",
"dataType": "choice",
"defaultValue": "MySQL",
"isRequired": false,
"choices": [
{
"choice": "SqlServer",
"description": "Sql Server"
},
{
"choice": "MySQL",
"description": "My SQL"
},
{
"choice": "Sqlite",
"description": "Sqlite"
},
{
"choice": "Oracle",
"description": "Oracle"
},
{
"choice": "OracleDevart",
"description": "Oracle Devart Driver"
},
{
"choice": "PostgreSql",
"description": "Postgre Sql"
}
]
},
"SqlServer": {
"type": "computed",
"value": "(DatabaseManagement == \"SqlServer\")"
},
"MySQL": {
"type": "computed",
"value": "(DatabaseManagement == \"MySQL\")"
},
"Sqlite": {
"type": "computed",
"value": "(DatabaseManagement == \"Sqlite\")"
},
"Oracle": {
"type": "computed",
"value": "(DatabaseManagement == \"Oracle\")"
},
"OracleDevart": {
"type": "computed",
"value": "(DatabaseManagement == \"Oracle.Devart\")"
},
"PostgreSql": {
"type": "computed",
"value": "(DatabaseManagement == \"PostgreSql\")"
},
"IdentityServer4": {
"type": "computed",
"value": "(AuthenticationScheme == \"IdentityServer4\")"
},
"OpenIddict": {
"type": "computed",
"value": "(AuthenticationScheme == \"OpenIddict\")"
}
}
}

5
aspnet-core/templates/micro/content/.template.config/template.zh-Hans.json

@ -0,0 +1,5 @@
{
"description": "适用于abp框架的微服务模板项目",
"symbols/AuthenticationScheme/description": "认证服务体系, 可选项为: IdentityServer4、OpenIddict, 默认使用IdentityServer4.",
"symbols/DatabaseManagement/description": "数据库管理提供者, 可选项为: SqlServer、MySQL、Sqlite、Oracle、OracleDevart、PostgreSql, 默认使用MySQL."
}

13
aspnet-core/templates/micro/content/Directory.Build.props

@ -0,0 +1,13 @@
<Project>
<PropertyGroup>
<IsTestProject Condition="$(MSBuildProjectFullPath.Contains('test')) and ($(MSBuildProjectName.EndsWith('.Tests')) or $(MSBuildProjectName.EndsWith('.TestBase')))">true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Condition="'$(IsTestProject)' == 'true'" Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

490
aspnet-core/templates/micro/content/Directory.Packages.props

@ -0,0 +1,490 @@
<Project>
<PropertyGroup>
<DotNetCoreCAPPackageVersion>8.2.0</DotNetCoreCAPPackageVersion>
<ElsaPackageVersion>2.14.1</ElsaPackageVersion>
<VoloAbpPackageVersion>8.3.0</VoloAbpPackageVersion>
<LINGYUNAbpPackageVersion>8.3.0</LINGYUNAbpPackageVersion>
<MicrosoftExtensionsPackageVersion>8.0.0</MicrosoftExtensionsPackageVersion>
<MicrosoftAspNetCorePackageVersion>8.0.0</MicrosoftAspNetCorePackageVersion>
<MicrosoftEntityFrameworkCorePackageVersion>8.0.0</MicrosoftEntityFrameworkCorePackageVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<!-- LINGYUN Abp Framework -->
<ItemGroup>
<PackageVersion Include="LINGYUN.Abp.AspNetCore.HttpOverrides" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.AspNetCore.Mvc.Localization" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.AspNetCore.Mvc.Wrapper" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.AuditLogging" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.AuditLogging.Elasticsearch" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Authorization.OrganizationUnits" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.BackgroundTasks.Abstractions" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.BackgroundTasks.Jobs" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Data.DbMigrator" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.DataProtection" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.DataProtection.Abstractions" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.DataProtection.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.DataProtectionManagement.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.DataProtectionManagement.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.DataProtectionManagement.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.DataProtectionManagement.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.DataProtectionManagement.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Dapr.Client" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Dapr.Client.Wrapper" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Dynamic.Queryable.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Dynamic.Queryable.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Dynamic.Queryable.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elasticsearch" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elsa.Activities" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.EntityChange.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.EntityChange.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.EntityChange.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.EventBus.CAP" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.ExceptionHandling" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.ExceptionHandling.Emailing" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Http.Client.Wrapper" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdGenerator" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.Session" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.Session.AspNetCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Localization.CultureMap" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.MultiTenancy" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.Core" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.SignalR" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.WxPusher" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Rules" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Rules.RulesEngine" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Saas.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.SettingManagement.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Serilog.Enrichers.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Serilog.Enrichers.UniqueId" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TextTemplating.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.UI.Navigation" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Webhooks" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Webhooks.Core" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Webhooks.EventBus" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Linq.Dynamic.Queryable" Version="$(LINGYUNAbpPackageVersion)" />
</ItemGroup>
<!-- Abp Framework -->
<ItemGroup>
<PackageVersion Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="3.2.0" />
<PackageVersion Include="Volo.Abp.Core" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Account.Application" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Account.Application.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Account.Domain" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Account.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Account.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Account.HttpApi" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Account.Web.IdentityServer" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Account.Web.OpenIddict" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.MultiTenancy" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.Mvc" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.Mvc.Client.Common" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.Mvc.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.Mvc.NewtonsoftJson" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.Serilog" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.SignalR" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.TestBase" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Auditing" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Auditing.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AuditLogging.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Authorization" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Authorization.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Autofac" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AutoMapper" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.BackgroundJobs" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.BackgroundJobs.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.BackgroundWorkers" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.BlobStoring" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.BlobStoring.FileSystem" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Caching" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Caching.StackExchangeRedis" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Cli.Core" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Data" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Ddd.Application" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Ddd.Application.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Ddd.Domain" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Ddd.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.DistributedLocking.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.DistributedLocking" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.EntityFrameworkCore.MySql" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Features" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.FeatureManagement.Application" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.FeatureManagement.Domain" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.FeatureManagement.HttpApi" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Emailing" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.EventBus" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.EventBus.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.ExceptionHandling" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Guids" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.GlobalFeatures" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.HangFire" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Http.Client" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Identity.AspNetCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Identity.Application" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Identity.Application.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Identity.Domain" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Identity.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Identity.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Identity.HttpApi" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.IdentityServer.Application" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.IdentityServer.Application.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.IdentityServer.Domain" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.IdentityServer.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.IdentityServer.HttpApi" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Identity.HttpApi.Client" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Imaging.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Imaging.ImageSharp" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Json" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Json.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Localization" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.MemoryDb" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.MultiTenancy" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.MultiTenancy.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.ObjectExtending" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.OpenIddict.Application" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.OpenIddict.Application.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.OpenIddict.AspNetCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.OpenIddict.Domain" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.OpenIddict.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.OpenIddict.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.OpenIddict.HttpApi" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.PermissionManagement.Application" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.PermissionManagement.Domain" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.PermissionManagement.HttpApi" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Quartz" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Security" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Settings" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.SettingManagement.Application" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.SettingManagement.Application.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.SettingManagement.Domain" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.SettingManagement.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.SettingManagement.HttpApi" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Swashbuckle" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Sms" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.TestBase" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.TextTemplating.Core" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.TextTemplating.Scriban" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Timing" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Threading" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Users.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Users.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Validation" Version="$(VoloAbpPackageVersion)" />
</ItemGroup>
<!-- .NET -->
<ItemGroup>
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.4" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="$(MicrosoftAspNetCorePackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="$(MicrosoftAspNetCorePackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Protocols.Json" Version="$(MicrosoftAspNetCorePackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.SignalR.StackExchangeRedis" Version="$(MicrosoftAspNetCorePackageVersion)" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.InMemory" Version="$(MicrosoftEntityFrameworkCorePackageVersion)" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="$(MicrosoftEntityFrameworkCorePackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.UserSecrets" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Http.Polly" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="$(MicrosoftExtensionsPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.2" />
</ItemGroup>
<!-- Elsa -->
<ItemGroup>
<PackageVersion Include="Elsa" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Activities.Email" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Activities.Http" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Activities.UserTask" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Activities.Temporal.Quartz" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Core" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Designer.Components.Web" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Rebus.RabbitMq" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Server.Api" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Webhooks.Api" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Webhooks.Persistence.EntityFramework.Core" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.WorkflowSettings.Persistence.EntityFramework.Core" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.Webhooks.Persistence.EntityFramework.MySql" Version="$(ElsaPackageVersion)" />
<PackageVersion Include="Elsa.WorkflowSettings.Persistence.EntityFramework.MySql" Version="$(ElsaPackageVersion)" />
</ItemGroup>
<!-- DotNetCore.CAP -->
<ItemGroup>
<PackageVersion Include="DotNetCore.CAP" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.Dashboard" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.MySql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.OpenTelemetry" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.Oracle" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.PostgreSql" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.RabbitMQ" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.SqlServer" Version="$(DotNetCoreCAPPackageVersion)" />
<PackageVersion Include="DotNetCore.CAP.Sqlite" Version="$(DotNetCoreCAPPackageVersion)" />
</ItemGroup>
<!-- Serilog -->
<ItemGroup>
<PackageVersion Include="Serilog" Version="3.1.1" />
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.0" />
<PackageVersion Include="Serilog.Enrichers.Environment" Version="2.3.0" />
<PackageVersion Include="Serilog.Enrichers.Assembly" Version="2.0.0" />
<PackageVersion Include="Serilog.Enrichers.Process" Version="2.0.2" />
<PackageVersion Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageVersion Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageVersion Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageVersion Include="Serilog.Sinks.Console" Version="5.0.0" />
<PackageVersion Include="Serilog.Sinks.Elasticsearch" Version="9.0.3" />
<PackageVersion Include="Serilog.Sinks.File" Version="5.0.0" />
</ItemGroup>
<!-- Test -->
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Moq.AutoMock" Version="3.0.0" />
<PackageVersion Include="NSubstitute" Version="5.1.0" />
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="xunit" Version="2.6.1" />
<PackageVersion Include="xunit.extensibility.execution" Version="2.6.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup>
<!-- Fody -->
<ItemGroup>
<PackageVersion Include="ConfigureAwait.Fody" Version="3.3.2" />
<PackageVersion Include="Fody" Version="6.8.0" />
</ItemGroup>
<!-- Other -->
<ItemGroup>
<PackageVersion Include="aliyun-net-sdk-core" Version="1.5.10" />
<PackageVersion Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
<PackageVersion Include="AgileConfig.Client" Version="1.6.9" />
<PackageVersion Include="Dapr.Client" Version="1.12.0" />
<PackageVersion Include="Dapr.Actors" Version="1.12.0" />
<PackageVersion Include="Dapr.Actors.AspNetCore" Version="1.12.0" />
<PackageVersion Include="DistributedLock.Core" Version="1.0.5" />
<PackageVersion Include="DistributedLock.Redis" Version="1.0.2" />
<PackageVersion Include="Hangfire.MySqlStorage" Version="2.0.3" />
<PackageVersion Include="HangFire.SqlServer" Version="1.8.6" />
<PackageVersion Include="IdentityModel" Version="6.2.0" />
<PackageVersion Include="JetBrains.Annotations" Version="2023.3.0" />
<PackageVersion Include="Markdig" Version="0.34.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NEST" Version="7.15.1" />
<PackageVersion Include="NRules" Version="0.9.2" />
<PackageVersion Include="Ocelot.Provider.Polly" Version="20.0.0" />
<PackageVersion Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.PermissionManagement.Domain.OpenIddict" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.AuditLogging.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Authentication.QQ" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Authentication.WeChat" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Aliyun.SettingManagement" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Aliyun" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Tencent.QQ" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Tencent.SettingManagement" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Tencent" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Features.LimitValidation.Redis.Client" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Features.LimitValidation.Redis" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Features.LimitValidation" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.RealTime" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Wrapper" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Exporter.MiniExcel" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.FeatureManagement.Client" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Localization.Persistence" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Logging.Serilog.Elasticsearch" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Logging" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Sms.Aliyun" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.AspNetCore.Mvc.Idempotent.Wrapper" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenApi.Authorization" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.MultiTenancy.Editions" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.WeChat" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat.MiniProgram" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat.Official.Handlers" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat.Official" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat.Official.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat.Official.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat.SettingManagement" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat.Work.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat.Work.Handlers" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat.Work.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat.Work" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WeChat" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Account.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Account.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Account.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Account.Templates" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Auditing.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Auditing.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Auditing.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.CachingManagement.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.CachingManagement.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.CachingManagement.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.CachingManagement.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.CachingManagement.StackExchangeRedis" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elsa.Activities.BlobStoring" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elsa.Activities.Emailing" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elsa.Activities.IM" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elsa.Activities.Notifications" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elsa.Activities.Sms" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elsa.Activities.Webhooks" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elsa.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elsa.Server" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Elsa" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.FeatureManagement.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.FeatureManagement.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdentityServer.Session" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.AspNetCore.Session" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.Notifications" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Identity.OrganizaztionUnits" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdentityServer.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdentityServer.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdentityServer.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdentityServer.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdentityServer.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdentityServer.LinkUser" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdentityServer.Portal" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdentityServer.SmsValidator" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IdentityServer.WeChat.Work" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.LocalizationManagement.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.LocalizationManagement.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.LocalizationManagement.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.LocalizationManagement.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.LocalizationManagement.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenIddict.AspNetCore.Session" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenIddict.AspNetCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IM.SignalR" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.IM" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.MessageService.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.MessageService.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.MessageService.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.MessageService.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.MessageService.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.MessageService.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.ExceptionHandling.Notifications" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.Common" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.Emailing" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.WeChat.MiniProgram" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Notifications.WeChat.Work" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenIddict.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenIddict.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenIddict.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenIddict.LinkUser" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenIddict.Sms" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenIddict.Portal" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenIddict.WeChat" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OpenIddict.WeChat.Work" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OssManagement.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OssManagement.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OssManagement.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OssManagement.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OssManagement.FileSystem" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OssManagement.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.OssManagement.SettingManagement" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.PermissionManagement.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.PermissionManagement.Domain.OrganizationUnits" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.PermissionManagement.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.UI.Navigation.VueVbenAdmin" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Platform.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Platform.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Platform.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Platform.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Platform.Settings.VueVbenAdmin" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Platform.Theme.VueVbenAdmin" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Saas.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Saas.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Saas.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Saas.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Saas.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.SettingManagement.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.SettingManagement.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.BackgroundTasks.Activities" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.BackgroundTasks.DistributedLocking" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.BackgroundTasks.EventBus" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.BackgroundTasks.ExceptionHandling" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.BackgroundTasks.Notifications" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.BackgroundTasks.Quartz" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.BackgroundTasks" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TaskManagement.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TaskManagement.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TaskManagement.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TaskManagement.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TaskManagement.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TaskManagement.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TextTemplating.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TextTemplating.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TextTemplating.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TextTemplating.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.TextTemplating.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Webhooks.Identity" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.Webhooks.Saas" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WebhooksManagement.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WebhooksManagement.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WebhooksManagement.Domain.Shared" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WebhooksManagement.Domain" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WebhooksManagement.EntityFrameworkCore" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Abp.WebhooksManagement.HttpApi" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Platform.Application.Contracts" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="LINGYUN.Platform.Application" Version="$(LINGYUNAbpPackageVersion)" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.8.1" />
<PackageVersion Include="OpenTelemetry.Exporter.Console" Version="1.8.1" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.8.1" />
<PackageVersion Include="OpenTelemetry.Exporter.Zipkin" Version="1.8.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.8.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.8.1" />
<PackageVersion Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" Version="1.0.0-beta.11" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.8.1" />
<PackageVersion Include="Polly" Version="8.2.0" />
<PackageVersion Include="Quartz.Serialization.Json" Version="3.7.0" />
<PackageVersion Include="RulesEngine" Version="4.0.0" />
<PackageVersion Include="Senparc.Weixin.MP" Version="16.18.9" />
<PackageVersion Include="SixLabors.ImageSharp" Version="3.0.2" />
<PackageVersion Include="SixLabors.ImageSharp.Drawing" Version="2.0.1" />
<PackageVersion Include="StackExchange.Redis" Version="2.7.4" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageVersion Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageVersion Include="Tencent.QCloud.Cos.Sdk" Version="5.4.37" />
<PackageVersion Include="TencentCloudSDK" Version="3.0.712" />
<PackageVersion Include="Yarp.ReverseProxy" Version="2.1.0" />
<PackageVersion Include="OpenIddict.Server.DataProtection" Version="5.5.0" />
<PackageVersion Include="OpenIddict.Validation.DataProtection" Version="5.5.0" />
</ItemGroup>
</Project>

12
aspnet-core/templates/micro/content/NuGet.Config

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
</packageSourceMapping>
</configuration>

129
aspnet-core/templates/micro/content/README.md

@ -0,0 +1,129 @@
# LINGYUN.Abp.Templates
[English](README.md) | [中文](README.zh-CN.md)
## Introduction
LINGYUN.Abp.Templates provides two types of project templates based on ABP Framework:
1. **Microservice Template**: A complete microservice architecture template with distributed services.
2. **All-in-One Template**: A single-application template that combines all services into one project.
## Features
### Common Features
- Integrated authentication (IdentityServer4/OpenIddict)
- Database integration (multiple databases supported)
- Unified configuration management
- Distributed event bus support
- Background job processing
### Microservice Template Features
- Complete microservice project structure
- Service discovery and registration
- Distributed deployment support
### All-in-One Template Features
- Simplified deployment
- Easier maintenance
- Lower resource requirements
## How to Use
### Install Templates
```bash
# Install Microservice Template
dotnet new install LINGYUN.Abp.MicroService.Templates
# Install All-in-One Template
dotnet new install LINGYUN.Abp.AllInOne.Templates
```
### Create New Project
#### For Microservice Project
```bash
# Short name: lam (LINGYUN Abp Microservice)
dotnet new lam -n YourCompanyName.YourProjectName -pk YourPackageName -o /path/to/output --dbms MySql --cs "Server=127.0.0.1;Database=YourDatabase;User Id=your_user;Password=your_password;SslMode=None" --no-random-port
```
#### For All-in-One Project
```bash
# Short name: laa (LINGYUN Abp AllInOne)
dotnet new laa -n YourCompanyName.YourProjectName -pk YourPackageName -o /path/to/output --dbms MySql --cs "Server=127.0.0.1;Database=YourDatabase;User Id=your_user;Password=your_password;SslMode=None" --no-random-port
```
## How to Run
After creating your project, you can run it using the following command:
### For Microservice Project
```bash
cd /path/to/output/host/YourPackageName.YourCompanyName.YourProjectName.HttpApi.Host
dotnet run --launch-profile "YourPackageName.YourCompanyName.YourProjectName.Development"
```
### For All-in-One Project
```bash
cd /path/to/output/host/YourPackageName.YourCompanyName.YourProjectName.AIO.Host
dotnet run --launch-profile "YourPackageName.YourCompanyName.YourProjectName.Development"
```
## How to Package and Publish
1. Clone the Project
```bash
git clone <repository-url>
cd <repository-path>/aspnet-core/templates/content
```
2. Modify Version
Edit the project files to update versions:
- For Microservice: `../PackageName.CompanyName.ProjectName.csproj`
- For All-in-One: `../PackageName.CompanyName.ProjectName.AIO.csproj`
```xml
<Version>8.3.0</Version>
```
3. Execute Packaging Script
```powershell
# Windows PowerShell
.\pack.ps1
# PowerShell Core (Windows/Linux/macOS)
pwsh pack.ps1
```
The script will prompt you to choose which template to package:
1. Microservice Template
2. All-in-One Template
3. Both Templates
## Supported Databases
- SqlServer
- MySQL
- PostgreSQL
- Oracle
- SQLite
## Notes
- Ensure .NET SDK 8.0 or higher is installed
- Choose the appropriate template based on your needs:
- Microservice Template: For large-scale distributed applications
- All-in-One Template: For smaller applications or simpler deployment requirements
- Pay attention to NuGet publish address and key when packaging
- Complete testing is recommended before publishing

129
aspnet-core/templates/micro/content/README.zh-CN.md

@ -0,0 +1,129 @@
# LINGYUN.Abp.Templates
[English](README.md) | [中文](README.zh-CN.md)
## 简介
LINGYUN.Abp.Templates 基于 ABP Framework 提供两种项目模板:
1. **微服务模板**:完整的分布式微服务架构模板
2. **单体应用模板**:将所有服务集成到一个项目中的单体应用模板
## 特性
### 共同特性
- 集成身份认证(支持 IdentityServer4/OpenIddict)
- 数据库集成(支持多种数据库)
- 统一配置管理
- 分布式事件总线支持
- 后台作业处理
### 微服务模板特性
- 完整的微服务项目结构
- 服务发现与注册
- 支持分布式部署
### 单体应用模板特性
- 简化的部署流程
- 更容易的维护
- 更低的资源需求
## 使用方法
### 安装模板
```bash
# 安装微服务模板
dotnet new install LINGYUN.Abp.MicroService.Templates
# 安装单体应用模板
dotnet new install LINGYUN.Abp.AllInOne.Templates
```
### 创建新项目
#### 创建微服务项目
```bash
# 简写名称:lam (LINGYUN Abp Microservice)
dotnet new lam -n YourCompanyName.YourProjectName -pk YourPackageName -o /path/to/output --dbms MySql --cs "Server=127.0.0.1;Database=YourDatabase;User Id=your_user;Password=your_password;SslMode=None" --no-random-port
```
#### 创建单体应用项目
```bash
# 简写名称:laa (LINGYUN Abp AllInOne)
labp create MyCompanyName.MyProjectName -pk MyPackageName -t laa -o /Users/feijie/Projects/Tests --dbms MySql --cs "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None" --no-random-port
```
## 运行项目
创建项目后,可以使用以下命令运行:
### 运行微服务项目
```bash
cd /path/to/output/host/YourPackageName.YourCompanyName.YourProjectName.HttpApi.Host
dotnet run --launch-profile "YourPackageName.YourCompanyName.YourProjectName.Development"
```
### 运行单体应用项目
```bash
cd /path/to/output/host/YourPackageName.YourCompanyName.YourProjectName.AIO.Host
dotnet run --launch-profile "YourPackageName.YourCompanyName.YourProjectName.Development"
```
## 打包与发布
1. 克隆项目
```bash
git clone <repository-url>
cd <repository-path>/aspnet-core/templates/content
```
2. 修改版本号
编辑项目文件更新版本号:
- 微服务模板:`../PackageName.CompanyName.ProjectName.csproj`
- 单体应用模板:`../PackageName.CompanyName.ProjectName.AIO.csproj`
```xml
<Version>8.3.0</Version>
```
3. 执行打包脚本
```powershell
# Windows PowerShell
.\pack.ps1
# PowerShell Core (Windows/Linux/macOS)
pwsh pack.ps1
```
脚本会提示您选择要打包的模板:
1. 微服务模板
2. 单体应用模板
3. 两种模板都打包
## 支持的数据库
- SqlServer
- MySQL
- PostgreSQL
- Oracle
- SQLite
## 注意事项
- 确保已安装 .NET SDK 8.0 或更高版本
- 根据需求选择合适的模板:
- 微服务模板:适用于大规模分布式应用
- 单体应用模板:适用于小型应用或简单部署需求
- 打包时注意 NuGet 发布地址和密钥
- 发布前建议进行完整测试

38
aspnet-core/templates/micro/content/common.props

@ -0,0 +1,38 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>8.2.1</Version>
<Authors>colin</Authors>
<NoWarn>$(NoWarn);CS1591;CS0436;CS8618;NU1803</NoWarn>
<PackageProjectUrl>https://github.com/colinin/abp-next-admin</PackageProjectUrl>
<PackageOutputPath>$(SolutionDir)LocalNuget</PackageOutputPath>
<PackageVersion>8.2.1</PackageVersion>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/colinin/abp-next-admin</RepositoryUrl>
<GeneratePackageOnBuild Condition="$(AssemblyName.StartsWith('LINGYUN'))">true</GeneratePackageOnBuild>
</PropertyGroup>
<ItemGroup>
<Compile Remove="LocalNuget\**" />
<EmbeddedResource Remove="LocalNuget\**" />
<None Remove="LocalNuget\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Modules\**" />
<EmbeddedResource Remove="Modules\**" />
<None Remove="Modules\**" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>$(SolutionDir)LocalNuget</OutputPath>
</PropertyGroup>
</Project>

9
aspnet-core/templates/micro/content/configureawait.props

@ -0,0 +1,9 @@
<Project>
<ItemGroup>
<PackageReference Include="ConfigureAwait.Fody" PrivateAssets="All" />
<PackageReference Include="Fody">
<PrivateAssets>All</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

53
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/DbMigratorHostedService.cs

@ -0,0 +1,53 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using PackageName.CompanyName.ProjectName.EntityFrameworkCore;
using Serilog;
using Volo.Abp;
using Volo.Abp.Data;
namespace PackageName.CompanyName.ProjectName.DbMigrator;
public class DbMigratorHostedService : IHostedService
{
private readonly IHostApplicationLifetime _hostApplicationLifetime;
private readonly IConfiguration _configuration;
public DbMigratorHostedService(
IHostApplicationLifetime hostApplicationLifetime,
IConfiguration configuration)
{
_hostApplicationLifetime = hostApplicationLifetime;
_configuration = configuration;
}
public async Task StartAsync(CancellationToken cancellationToken)
{
using var application = await AbpApplicationFactory
.CreateAsync<PackageNameCompanyNameProjectNameDbMigratorModule>(options =>
{
options.Configuration.UserSecretsId = Environment.GetEnvironmentVariable("APPLICATION_USER_SECRETS_ID");
options.Configuration.UserSecretsAssembly = typeof(DbMigratorHostedService).Assembly;
options.Services.ReplaceConfiguration(_configuration);
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
options.AddDataMigrationEnvironment();
});
await application.InitializeAsync();
await application
.ServiceProvider
.GetRequiredService<ProjectNameDbMigrationService>()
.CheckAndApplyDatabaseMigrationsAsync();
await application.ShutdownAsync();
_hostApplicationLifetime.StopApplication();
}
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}

3
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

42
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/PackageName.CompanyName.ProjectName.DbMigrator.csproj

@ -0,0 +1,42 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props" />
<Import Project="../../configureawait.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Serilog.Extensions.Logging" />
<PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="Serilog.Sinks.Console" />
<PackageReference Include="Microsoft.Extensions.Hosting" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.Autofac" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" Condition="'$(MySQL)'=='true'" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Condition="'$(SqlServer)'=='true'" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.Sqlite" Condition="'$(Sqlite)'=='true'" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.Oracle" Condition="'$(Oracle)'=='true'" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.Oracle.Devart" Condition="'$(OracleDevart)'=='true'" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Condition="'$(PostgreSql)'=='true'" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\PackageName.CompanyName.ProjectName.EntityFrameworkCore\PackageName.CompanyName.ProjectName.EntityFrameworkCore.csproj" />
</ItemGroup>
</Project>

13
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/PackageNameCompanyNameProjectNameDbMigratorModule.cs

@ -0,0 +1,13 @@
using PackageName.CompanyName.ProjectName.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace PackageName.CompanyName.ProjectName.DbMigrator;
[DependsOn(
typeof(AbpAutofacModule),
typeof(ProjectNameEntityFrameworkCoreModule)
)]
public class PackageNameCompanyNameProjectNameDbMigratorModule : AbpModule
{
}

40
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/Program.cs

@ -0,0 +1,40 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;
using Serilog.Events;
namespace PackageName.CompanyName.ProjectName.DbMigrator;
public class Program
{
public async static Task Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning)
#if DEBUG
.MinimumLevel.Override("PackageName.CompanyName.ProjectName", LogEventLevel.Debug)
#else
.MinimumLevel.Override("PackageName.CompanyName.ProjectName", LogEventLevel.Information)
#endif
.Enrich.FromLogContext()
.WriteTo.File("Logs/logs.txt")
.WriteTo.Console()
.CreateLogger();
await CreateHostBuilder(args).RunConsoleAsync();
}
public static IHostBuilder CreateHostBuilder(string[] args)
{
return Host.CreateDefaultBuilder(args)
.AddAppSettingsSecretsJson()
.ConfigureLogging((context, logging) => logging.ClearProviders())
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<DbMigratorHostedService>();
});
}
}

147
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/appsettings.Development.json

@ -0,0 +1,147 @@
{
"AgileConfig": {
"IsEnabled": false,
"env": "DEV",
"appId": "PackageName.CompanyName.ProjectName",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:15000",
"name": "PackageName.CompanyName.ProjectName",
"tag": "PackageName.CompanyName.ProjectName"
},
"Auditing": {
"AllEntitiesSelector": true
},
"DistributedCache": {
"HideErrors": true,
"KeyPrefix": "LINGYUN.Abp.Application",
"GlobalCacheEntryOptions": {
"SlidingExpiration": "30:00:00",
"AbsoluteExpirationRelativeToNow": "60:00:00"
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"ProjectName": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpSaas": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpFeatureManagement": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpPermissionManagement": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpSettingManagement": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpTextTemplating": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456"
},
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=15"
}
},
"OpenTelemetry": {
"IsEnabled": true,
"ZipKin": {
"Endpoint": "http://127.0.0.1:9411/api/v2/spans"
}
},
"RemoteServices": {},
"IdentityClients": {
"InternalServiceClient": {
"Authority": "http://127.0.0.1:44385",
"RequireHttps": false,
"GrantType": "client_credentials",
"Scope": "lingyun-abp-application",
"ClientId": "InternalServiceClient",
"ClientSecret": "1q2w3E*"
}
},
"CAP": {
"EventBus": {
"DefaultGroupName": "ProjectName",
"GroupNamePrefix": "Dev",
"Version": "v1",
"FailedRetryInterval": 300,
"FailedRetryCount": 10
},
"MySql": {
"TableNamePrefix": "ProjectName_cap",
"ConnectionString": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456"
},
"SqlServer": {
"TableNamePrefix": "ProjectName_cap",
"ConnectionString": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456"
},
"Sqlite": {
"TableNamePrefix": "ProjectName_cap",
"ConnectionString": "Data Source=./cap.db"
},
"Oracle": {
"TableNamePrefix": "ProjectName_cap",
"ConnectionString": "Data Source=ProjectName;Integrated Security=yes;"
},
"PostgreSql": {
"TableNamePrefix": "ProjectName_cap",
"ConnectionString": "Host=localhost;Port=5432;Database=ProjectName;User ID=root;Password=123456;"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
"ExchangeName": "LINGYUN.Abp.Application",
"VirtualHost": "/"
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"MapInboundClaims": false,
"RequireHttpsMetadata": false,
"SwaggerClientId": "InternalServiceClient",
"SwaggerClientSecret": "1q2w3E*"
},
"Logging": {
"Serilog": {
"Elasticsearch": {
"IndexFormat": "abp.dev.logging-{0:yyyy.MM.dd}"
}
}
},
"AuditLogging": {
"Elasticsearch": {
"IndexPrefix": "abp.dev.auditing"
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
},
"Serilog": {
"MinimumLevel": {
"Default": "Debug",
"Override": {
"System": "Warning",
"Microsoft": "Warning",
"DotNetCore": "Debug"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"restrictedToMinimumLevel": "Debug",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"
}
}
]
}
}

80
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.DbMigrator/appsettings.json

@ -0,0 +1,80 @@
{
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",
"InitVectorBytes": "s83ng0abvd02js84",
"DefaultSalt": "sf&5)s3#"
},
"AllowedHosts": "*",
"Serilog": {
"MinimumLevel": {
"Default": "Debug",
"Override": {
"Microsoft.EntityFrameworkCore": "Debug",
"System": "Information",
"Microsoft": "Information"
}
},
"Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ],
"WriteTo": [
{
"Name": "Console",
"Args": {
"initialMinimumLevel": "Verbose",
"standardErrorFromLevel": "Verbose",
"restrictedToMinimumLevel": "Verbose",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/Debug-.log",
"restrictedToMinimumLevel": "Debug",
"rollingInterval": "Day",
"fileSizeLimitBytes": 5242880,
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/Info-.log",
"restrictedToMinimumLevel": "Information",
"rollingInterval": "Day",
"fileSizeLimitBytes": 5242880,
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/Warn-.log",
"restrictedToMinimumLevel": "Warning",
"rollingInterval": "Day",
"fileSizeLimitBytes": 5242880,
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/Error-.log",
"restrictedToMinimumLevel": "Error",
"rollingInterval": "Day",
"fileSizeLimitBytes": 5242880,
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/Fatal-.log",
"restrictedToMinimumLevel": "Fatal",
"rollingInterval": "Day",
"fileSizeLimitBytes": 5242880,
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
}
]
}
}

12
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/Controllers/HomeController.cs

@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace PackageName.CompanyName.ProjectName.Controllers;
public class HomeController : AbpController
{
public IActionResult Index()
{
return Redirect("/swagger/index.html");
}
}

57
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/Dockerfile

@ -0,0 +1,57 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0
LABEL maintainer="colin.in@foxmail.com"
WORKDIR /app
COPY . /app
## 设置服务器时区.
## 建议在外部(如docker-compose.yml)中定义
## Set server time zone.
## Suggest defining it externally (such as Docker Compose. yml)
#ENV TZ=Asia/Shanghai
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
## 解决连接SqlServer TLS版本过高问题.
## 如果数据提供者是SqlServer, 且兼容性版本在120及以下,需要手动取消注释.
## The version of connection SqlServer TLS is too high.
## If the data provider is SqlServer and the compatibility version is 120 and below, manual annotation needs to be cancelled.
#RUN sed -i 's/\[openssl_init\]/# \[openssl_init\]/g' /etc/ssl/openssl.cnf
#RUN sed -i '$a\[openssl_init]' /etc/ssl/openssl.cnf
#RUN sed -i '$a\providers = provider_sect' /etc/ssl/openssl.cnf
#RUN sed -i '$a\ssl_conf = ssl_sect' /etc/ssl/openssl.cnf
#
#RUN sed -i '$a\[provider_sect]' /etc/ssl/openssl.cnf
#RUN sed -i '$a\default = default_sect' /etc/ssl/openssl.cnf
#RUN sed -i '$a\legacy = legacy_sect' /etc/ssl/openssl.cnf
#
#RUN sed -i '$a\[default_sect]' /etc/ssl/openssl.cnf
#RUN sed -i '$a\activate = 1' /etc/ssl/openssl.cnf
#
#RUN sed -i '$a\[legacy_sect]' /etc/ssl/openssl.cnf
#RUN sed -i '$a\activate = 1' /etc/ssl/openssl.cnf
#
#RUN sed -i '$a\[ssl_sect]' /etc/ssl/openssl.cnf
#RUN sed -i '$a\system_default = system_default_sect' /etc/ssl/openssl.cnf
#
#RUN sed -i '$a\[system_default_sect]' /etc/ssl/openssl.cnf
#RUN sed -i '$a\CipherString = DEFAULT:@SECLEVEL=0' /etc/ssl/openssl.cnf
## 阿里源
#RUN sed -i "s@http://deb.debian.org@http://mirrors.aliyun.com@g" /etc/apt/sources.list.d/debian.sources
#RUN apt-get clean
#RUN apt-get update
## .NET 8.0 默认使用8080端口,变更为80端口需要环境变量ASPNETCORE_HTTP_PORTS=80
## .NET 8.0 defaults to port 8080, changing to port 80 requires the environment variable ASPNETCORE.HTTP-PORTS=80
# EXPOSE 8080/tcp
EXPOSE 80/tcp
VOLUME [ "./app/Logs" ]
VOLUME [ "./app/Modules" ]
RUN apt update
RUN apt install wget -y
ENTRYPOINT ["dotnet", "PackageName.CompanyName.ProjectName.HttpApi.Host.dll"]

76
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/PackageName.CompanyName.ProjectName.HttpApi.Host.csproj

@ -0,0 +1,76 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>PackageName.CompanyName.ProjectName</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AgileConfig.Client" />
<PackageReference Include="DotNetCore.CAP.Dashboard" />
<PackageReference Include="DotNetCore.CAP.MySql" Condition="'$(MySQL)'=='true'" />
<PackageReference Include="DotNetCore.CAP.SqlServer" Condition="'$(SqlServer)'=='true'" />
<PackageReference Include="DotNetCore.CAP.Oracle" Condition="'$(Oracle)'=='true'" />
<PackageReference Include="DotNetCore.CAP.Oracle" Condition="'$(OracleDevart)'=='true'" />
<PackageReference Include="DotNetCore.CAP.PostgreSql" Condition="'$(PostgreSql)'=='true'" />
<PackageReference Include="DotNetCore.CAP.Sqlite" Condition="'$(Sqlite)'=='true'" />
<PackageReference Include="DotNetCore.CAP.RabbitMQ" />
<PackageReference Include="DotNetCore.CAP.OpenTelemetry" />
<PackageReference Include="LINGYUN.Abp.AspNetCore.HttpOverrides" />
<PackageReference Include="LINGYUN.Abp.AspNetCore.Mvc.Localization" />
<PackageReference Include="LINGYUN.Abp.AspNetCore.Mvc.Wrapper" />
<PackageReference Include="LINGYUN.Abp.AuditLogging.Elasticsearch" />
<PackageReference Include="LINGYUN.Abp.Data.DbMigrator" />
<PackageReference Include="LINGYUN.Abp.Dapr.Client.Wrapper" />
<PackageReference Include="LINGYUN.Abp.EventBus.CAP" />
<PackageReference Include="LINGYUN.Abp.ExceptionHandling.Emailing" />
<PackageReference Include="LINGYUN.Abp.Localization.CultureMap" />
<PackageReference Include="LINGYUN.Abp.Identity.Session.AspNetCore" />
<PackageReference Include="LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore" />
<PackageReference Include="LINGYUN.Abp.Saas.EntityFrameworkCore" />
<PackageReference Include="LINGYUN.Abp.Serilog.Enrichers.Application" />
<PackageReference Include="LINGYUN.Abp.Serilog.Enrichers.UniqueId" />
<PackageReference Include="LINGYUN.Abp.TextTemplating.EntityFrameworkCore" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" />
<PackageReference Include="DistributedLock.Redis" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" />
<PackageReference Include="OpenTelemetry.Exporter.Zipkin" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" />
<PackageReference Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" />
<PackageReference Include="Serilog.AspNetCore" />
<PackageReference Include="Serilog.Enrichers.Environment" />
<PackageReference Include="Serilog.Enrichers.Assembly" />
<PackageReference Include="Serilog.Enrichers.Process" />
<PackageReference Include="Serilog.Enrichers.Thread" />
<PackageReference Include="Serilog.Settings.Configuration" />
<PackageReference Include="Serilog.Sinks.Elasticsearch" />
<PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" />
<PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Volo.Abp.Autofac" />
<PackageReference Include="Volo.Abp.DistributedLocking" />
<PackageReference Include="Volo.Abp.Swashbuckle" />
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\PackageName.CompanyName.ProjectName.Application\PackageName.CompanyName.ProjectName.Application.csproj" />
<ProjectReference Include="..\..\src\PackageName.CompanyName.ProjectName.EntityFrameworkCore\PackageName.CompanyName.ProjectName.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\src\PackageName.CompanyName.ProjectName.HttpApi\PackageName.CompanyName.ProjectName.HttpApi.csproj" />
<ProjectReference Include="..\..\src\PackageName.CompanyName.ProjectName.SettingManagement\PackageName.CompanyName.ProjectName.SettingManagement.csproj" />
</ItemGroup>
</Project>

65
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/Program.cs

@ -0,0 +1,65 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using System;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.IO;
using Volo.Abp.Modularity.PlugIns;
namespace PackageName.CompanyName.ProjectName;
public class Program
{
public async static Task<int> Main(string[] args)
{
try
{
Console.Title = "Web.Host";
Log.Information("Starting web host.");
var builder = WebApplication.CreateBuilder(args);
builder.Host.AddAppSettingsSecretsJson()
.UseAutofac()
.ConfigureAppConfiguration((context, config) =>
{
var configuration = config.Build();
var agileConfigEnabled = configuration["AgileConfig:IsEnabled"];
if (agileConfigEnabled.IsNullOrEmpty() || bool.Parse(agileConfigEnabled))
{
config.AddAgileConfig(new AgileConfig.Client.ConfigClient(configuration));
}
})
.UseSerilog((context, provider, config) =>
{
config.ReadFrom.Configuration(context.Configuration);
});
await builder.AddApplicationAsync<ProjectNameHttpApiHostModule>(options =>
{
ProjectNameHttpApiHostModule.ApplicationName = Environment.GetEnvironmentVariable("APPLICATION_NAME")
?? ProjectNameHttpApiHostModule.ApplicationName;
options.ApplicationName = ProjectNameHttpApiHostModule.ApplicationName;
// 搜索 Modules 目录下所有文件作为插件
// 取消显示引用所有其他项目的模块,改为通过插件的形式引用
var pluginFolder = Path.Combine(
Directory.GetCurrentDirectory(), "Modules");
DirectoryHelper.CreateIfNotExists(pluginFolder);
options.PlugInSources.AddFolder(
pluginFolder,
SearchOption.AllDirectories);
});
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
return 0;
}
finally
{
Log.CloseAndFlush();
}
}
}

445
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.Configure.cs

@ -0,0 +1,445 @@
using DotNetCore.CAP;
using LINGYUN.Abp.Dapr.Client.ClientProxying;
using LINGYUN.Abp.Dapr.Client.DynamicProxying;
using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.Localization.CultureMap;
using LINGYUN.Abp.Localization.Persistence;
using LINGYUN.Abp.Serilog.Enrichers.Application;
using LINGYUN.Abp.Serilog.Enrichers.UniqueId;
using LINGYUN.Abp.Wrapper;
using Medallion.Threading;
using Medallion.Threading.Redis;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using OpenTelemetry.Metrics;
using OpenTelemetry.Resources;
using OpenTelemetry.Trace;
using PackageName.CompanyName.ProjectName.Localization;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Encodings.Web;
using System.Text.Unicode;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.AntiForgery;
using Volo.Abp.Auditing;
using Volo.Abp.Caching;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.GlobalFeatures;
using Volo.Abp.Http.Client;
using Volo.Abp.Json;
using Volo.Abp.Json.SystemTextJson;
using Volo.Abp.Localization;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Security.Claims;
using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem;
using static IdentityModel.ClaimComparer;
namespace PackageName.CompanyName.ProjectName;
public partial class ProjectNameHttpApiHostModule
{
public static string ApplicationName { get; set; } = "ProjectNameService";
private const string DefaultCorsPolicyName = "Default";
private static readonly OneTimeRunner OneTimeRunner = new();
private void PreConfigureFeature()
{
OneTimeRunner.Run(() =>
{
GlobalFeatureManager.Instance.Modules.Editions().EnableAll();
});
}
private void PreConfigureApp()
{
AbpSerilogEnrichersConsts.ApplicationName = ApplicationName;
PreConfigure<AbpSerilogEnrichersUniqueIdOptions>(options =>
{
// 以开放端口区别
options.SnowflakeIdOptions.WorkerId = 5;
options.SnowflakeIdOptions.WorkerIdBits = 5;
options.SnowflakeIdOptions.DatacenterId = 1;
});
}
private void PreConfigureCAP(IConfiguration configuration)
{
PreConfigure<CapOptions>(options =>
{
options
#if MySQL
.UseMySql(sqlOptions =>
{
configuration.GetSection("CAP:MySql").Bind(sqlOptions);
})
#elif SqlServer
.UseSqlServer(sqlOptions =>
{
configuration.GetSection("CAP:SqlServer").Bind(sqlOptions);
})
#elif Sqlite
.UseSqlite(sqlOptions =>
{
configuration.GetSection("CAP:Sqlite").Bind(sqlOptions);
})
#elif Oracle || OracleDevart
.UseOracle(sqlOptions =>
{
configuration.GetSection("CAP:Oracle").Bind(sqlOptions);
})
#elif PostgreSql
.UsePostgreSql(sqlOptions =>
{
configuration.GetSection("CAP:PostgreSql").Bind(sqlOptions);
})
#endif
.UseRabbitMQ(rabbitMQOptions =>
{
configuration.GetSection("CAP:RabbitMQ").Bind(rabbitMQOptions);
})
.UseDashboard();
});
}
private void ConfigureJsonSerializer(IConfiguration configuration)
{
// 统一时间日期格式
Configure<AbpJsonOptions>(options =>
{
var jsonConfiguration = configuration.GetSection("Json");
if (jsonConfiguration.Exists())
{
jsonConfiguration.Bind(options);
}
});
// 中文序列化的编码问题
Configure<AbpSystemTextJsonSerializerOptions>(options =>
{
options.JsonSerializerOptions.Encoder = JavaScriptEncoder.Create(UnicodeRanges.All);
});
}
private void ConfigureDistributedLock(IServiceCollection services, IConfiguration configuration)
{
var distributedLockIsEnabled = configuration["DistributedLock:IsEnabled"];
if (distributedLockIsEnabled.IsNullOrWhiteSpace() || bool.Parse(distributedLockIsEnabled))
{
var redis = ConnectionMultiplexer.Connect(configuration["DistributedLock:Redis:Configuration"]);
services.AddSingleton<IDistributedLockProvider>(_ => new RedisDistributedSynchronizationProvider(redis.GetDatabase()));
}
}
private void ConfigureOpenTelemetry(IServiceCollection services, IConfiguration configuration)
{
var openTelemetryEnabled = configuration["OpenTelemetry:IsEnabled"];
if (openTelemetryEnabled.IsNullOrEmpty() || bool.Parse(openTelemetryEnabled))
{
services.AddOpenTelemetry()
.ConfigureResource(resource =>
{
resource.AddService(ApplicationName);
})
.WithTracing(tracing =>
{
tracing.AddHttpClientInstrumentation();
tracing.AddAspNetCoreInstrumentation();
tracing.AddCapInstrumentation();
tracing.AddEntityFrameworkCoreInstrumentation();
tracing.AddSource(ApplicationName);
var tracingOtlpEndpoint = configuration["OpenTelemetry:Otlp:Endpoint"];
if (!tracingOtlpEndpoint.IsNullOrWhiteSpace())
{
tracing.AddOtlpExporter(otlpOptions =>
{
otlpOptions.Endpoint = new Uri(tracingOtlpEndpoint);
});
return;
}
var zipkinEndpoint = configuration["OpenTelemetry:ZipKin:Endpoint"];
if (!zipkinEndpoint.IsNullOrWhiteSpace())
{
tracing.AddZipkinExporter(zipKinOptions =>
{
zipKinOptions.Endpoint = new Uri(zipkinEndpoint);
});
return;
}
})
.WithMetrics(metrics =>
{
metrics.AddRuntimeInstrumentation();
metrics.AddHttpClientInstrumentation();
metrics.AddAspNetCoreInstrumentation();
});
}
}
private void ConfigureExceptionHandling()
{
// 自定义需要处理的异常
Configure<AbpExceptionHandlingOptions>(options =>
{
// 加入需要处理的异常类型
options.Handlers.Add<Volo.Abp.Data.AbpDbConcurrencyException>();
options.Handlers.Add<AbpInitializationException>();
options.Handlers.Add<OutOfMemoryException>();
options.Handlers.Add<System.Data.Common.DbException>();
options.Handlers.Add<Microsoft.EntityFrameworkCore.DbUpdateException>();
options.Handlers.Add<System.Data.DBConcurrencyException>();
});
// 自定义需要发送邮件通知的异常类型
Configure<AbpEmailExceptionHandlingOptions>(options =>
{
// 是否发送堆栈信息
options.SendStackTrace = true;
// 未指定异常接收者的默认接收邮件
// 指定自己的邮件地址
});
}
private void ConfigureIdentity(IConfiguration configuration)
{
Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
var refreshClaimsUrl = configuration["App:RefreshClaimsUrl"];
if (!refreshClaimsUrl.IsNullOrWhiteSpace())
{
options.RemoteRefreshUrl = refreshClaimsUrl + options.RemoteRefreshUrl;
}
});
}
private void ConfigureAuditing(IConfiguration configuration)
{
Configure<AbpAuditingOptions>(options =>
{
options.ApplicationName = ApplicationName;
// 是否启用实体变更记录
var allEntitiesSelectorIsEnabled = configuration["Auditing:AllEntitiesSelector"];
if (allEntitiesSelectorIsEnabled.IsNullOrWhiteSpace() || bool.Parse(allEntitiesSelectorIsEnabled))
{
options.EntityHistorySelectors.AddAllEntities();
}
});
}
private void ConfigureCaching(IConfiguration configuration)
{
Configure<AbpDistributedCacheOptions>(options =>
{
configuration.GetSection("DistributedCache").Bind(options);
});
Configure<RedisCacheOptions>(options =>
{
var redisConfig = ConfigurationOptions.Parse(options.Configuration);
options.ConfigurationOptions = redisConfig;
options.InstanceName = configuration["Redis:InstanceName"];
});
}
private void ConfigureMvc(IServiceCollection services, IConfiguration configuration)
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ExposeIntegrationServices = true;
});
Configure<AbpEndpointRouterOptions>(options =>
{
options.EndpointConfigureActions.Add((builder) =>
{
builder.Endpoints.MapHealthChecks(configuration["App:HealthChecks"] ?? "/healthz");
});
});
services.AddHealthChecks();
}
private void ConfigureVirtualFileSystem()
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<ProjectNameHttpApiHostModule>("PackageName.CompanyName.ProjectName");
});
}
private void ConfigureMultiTenancy(IConfiguration configuration)
{
// 多租户
Configure<AbpMultiTenancyOptions>(options =>
{
options.IsEnabled = true;
});
var tenantResolveCfg = configuration.GetSection("App:Domains");
if (tenantResolveCfg.Exists())
{
Configure<AbpTenantResolveOptions>(options =>
{
var domains = tenantResolveCfg.Get<string[]>();
foreach (var domain in domains)
{
options.AddDomainTenantResolver(domain);
}
});
}
}
private void ConfigureSwagger(IServiceCollection services)
{
// Swagger
services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "ProjectName API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
{
Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
Name = "Authorization",
In = ParameterLocation.Header,
Scheme = "bearer",
Type = SecuritySchemeType.Http,
BearerFormat = "JWT"
});
options.AddSecurityRequirement(new OpenApiSecurityRequirement
{
{
new OpenApiSecurityScheme
{
Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" }
},
new string[] { }
}
});
options.OperationFilter<TenantHeaderParamter>();
});
}
private void ConfigureLocalization()
{
// 支持本地化语言类型
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("en", "en", "English"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
});
Configure<AbpLocalizationPersistenceOptions>(options =>
{
// 持久化本地化资源
options.SaveStaticLocalizationsToPersistence = true;
options.AddPersistenceResource<ProjectNameResource>();
});
Configure<AbpLocalizationCultureMapOptions>(options =>
{
var zhHansCultureMapInfo = new CultureMapInfo
{
TargetCulture = "zh-Hans",
SourceCultures = new string[] { "zh", "zh_CN", "zh-CN" }
};
options.CulturesMaps.Add(zhHansCultureMapInfo);
options.UiCulturesMaps.Add(zhHansCultureMapInfo);
});
}
private void ConfigureSecurity(IServiceCollection services, IConfiguration configuration, bool isDevelopment = false)
{
Configure<AbpAntiForgeryOptions>(options =>
{
// options.AutoValidate = false;
// options.AutoValidateFilter = (type) => !type.Namespace.Contains("elsa", StringComparison.CurrentCultureIgnoreCase);
});
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{
configuration.GetSection("AuthServer").Bind(options);
});
if (!isDevelopment)
{
var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
services
.AddDataProtection()
.SetApplicationName("LINGYUN.Abp.Application")
.PersistKeysToStackExchangeRedis(redis, "LINGYUN.Abp.Application:DataProtection:Protection-Keys");
}
}
private void ConfigureCors(IServiceCollection services, IConfiguration configuration)
{
services.AddCors(options =>
{
options.AddPolicy(DefaultCorsPolicyName, builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray()
)
.WithAbpExposedHeaders()
.WithAbpWrapExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
}
private void ConfigureWrapper()
{
Configure<AbpWrapperOptions>(options =>
{
// 取消注释包装结果
options.IsEnabled = true;
});
}
private void PreConfigureWrapper()
{
PreConfigure<AbpHttpClientBuilderOptions>(options =>
{
// http服务间调用发送不需要包装结果的请求头
options.ProxyClientActions.Add(
(_, _, client) =>
{
client.DefaultRequestHeaders.TryAddWithoutValidation(AbpHttpWrapConsts.AbpDontWrapResult, "true");
});
});
PreConfigure<AbpDaprClientProxyOptions>(options =>
{
// dapr服务间调用发送不需要包装结果的请求头
options.ProxyRequestActions.Add(
(appId, httpRequestMessage) =>
{
httpRequestMessage.Headers.TryAddWithoutValidation(AbpHttpWrapConsts.AbpDontWrapResult, "true");
});
});
}
}

127
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/ProjectNameHttpApiHostModule.cs

@ -0,0 +1,127 @@
using LINGYUN.Abp.AspNetCore.Mvc.Wrapper;
using LINGYUN.Abp.AuditLogging.Elasticsearch;
using LINGYUN.Abp.EventBus.CAP;
using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
using LINGYUN.Abp.TextTemplating.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using LINGYUN.Abp.Serilog.Enrichers.Application;
using LINGYUN.Abp.Serilog.Enrichers.UniqueId;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using PackageName.CompanyName.ProjectName.EntityFrameworkCore;
using PackageName.CompanyName.ProjectName.SettingManagement;
using Volo.Abp;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.Caching.StackExchangeRedis;
using Volo.Abp.DistributedLocking;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Http.Client.IdentityModel.Web;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.Swashbuckle;
using LINGYUN.Abp.AspNetCore.HttpOverrides;
using LINGYUN.Abp.Identity.Session.AspNetCore;
namespace PackageName.CompanyName.ProjectName;
[DependsOn(
typeof(AbpSerilogEnrichersApplicationModule),
typeof(AbpSerilogEnrichersUniqueIdModule),
typeof(AbpAuditLoggingElasticsearchModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(ProjectNameApplicationModule),
typeof(ProjectNameHttpApiModule),
typeof(ProjectNameEntityFrameworkCoreModule),
typeof(ProjectNameSettingManagementModule),
typeof(AbpEmailingExceptionHandlingModule),
typeof(AbpCAPEventBusModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpLocalizationManagementEntityFrameworkCoreModule),
typeof(AbpTextTemplatingEntityFrameworkCoreModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpDistributedLockingModule),
typeof(AbpAspNetCoreMvcWrapperModule),
typeof(AbpAspNetCoreHttpOverridesModule),
typeof(AbpIdentitySessionAspNetCoreModule),
typeof(AbpSwashbuckleModule),
typeof(AbpAutofacModule)
)]
public partial class ProjectNameHttpApiHostModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
PreConfigureApp();
PreConfigureWrapper();
PreConfigureFeature();
PreConfigureCAP(configuration);
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureWrapper();
ConfigureLocalization();
ConfigureExceptionHandling();
ConfigureVirtualFileSystem();
ConfigureCaching(configuration);
ConfigureAuditing(configuration);
ConfigureIdentity(configuration);
ConfigureMultiTenancy(configuration);
ConfigureJsonSerializer(configuration);
ConfigureSwagger(context.Services);
ConfigureMvc(context.Services, configuration);
ConfigureCors(context.Services, configuration);
ConfigureOpenTelemetry(context.Services, configuration);
ConfigureDistributedLock(context.Services, configuration);
ConfigureSecurity(context.Services, configuration, hostingEnvironment.IsDevelopment());
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
app.UseForwardedHeaders();
app.UseMapRequestLocalization();
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
app.UseCors();
app.UseAuthentication();
app.UseJwtTokenMiddleware();
app.UseMultiTenancy();
app.UseAbpSession();
app.UseDynamicClaims();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support ProjectName API");
var configuration = context.GetConfiguration();
options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
options.OAuthScopes("ProjectName");
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
}

28
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/Properties/launchSettings.json

@ -0,0 +1,28 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:20890",
"sslPort": 0
}
},
"profiles": {
"PackageName.CompanyName.ProjectName.HttpApi.Host": {
"commandName": "Project",
"launchBrowser": false,
"dotnetRunMessages": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://127.0.0.1:5000"
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": false,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

31
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/TenantHeaderParamter.cs

@ -0,0 +1,31 @@
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using Swashbuckle.AspNetCore.SwaggerGen;
using System.Collections.Generic;
using Volo.Abp.MultiTenancy;
namespace PackageName.CompanyName.ProjectName;
public class TenantHeaderParamter : IOperationFilter
{
private readonly AbpMultiTenancyOptions _options;
public TenantHeaderParamter(
IOptions<AbpMultiTenancyOptions> options)
{
_options = options.Value;
}
public void Apply(OpenApiOperation operation, OperationFilterContext context)
{
if (_options.IsEnabled)
{
operation.Parameters = operation.Parameters ?? new List<OpenApiParameter>();
operation.Parameters.Add(new OpenApiParameter
{
Name = TenantResolverConsts.DefaultTenantKey,
In = ParameterLocation.Header,
Description = "Tenant Id/Name",
Required = false
});
}
}
}

153
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/appsettings.Development.json

@ -0,0 +1,153 @@
{
"AgileConfig": {
"IsEnabled": false,
"env": "DEV",
"appId": "PackageName.CompanyName.ProjectName",
"secret": "1q2w3E*",
"nodes": "http://127.0.0.1:15000",
"name": "PackageName.CompanyName.ProjectName",
"tag": "PackageName.CompanyName.ProjectName"
},
"App": {
"CorsOrigins": "http://127.0.0.1:30000",
"RefreshClaimsUrl": "http://127.0.0.1:30015/",
"HealthChecks": "/healthz"
},
"Auditing": {
"AllEntitiesSelector": true
},
"DistributedCache": {
"HideErrors": true,
"KeyPrefix": "LINGYUN.Abp.Application",
"GlobalCacheEntryOptions": {
"SlidingExpiration": "30:00:00",
"AbsoluteExpirationRelativeToNow": "60:00:00"
}
},
"ConnectionStrings": {
"Default": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"ProjectName": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpSaas": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpFeatureManagement": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpPermissionManagement": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpSettingManagement": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpLocalizationManagement": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456",
"AbpTextTemplating": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456"
},
"DistributedLock": {
"IsEnabled": true,
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=15"
}
},
"OpenTelemetry": {
"IsEnabled": true,
"ZipKin": {
"Endpoint": "http://127.0.0.1:9411/api/v2/spans"
}
},
"RemoteServices": {},
"IdentityClients": {
"InternalServiceClient": {
"Authority": "http://127.0.0.1:44385",
"RequireHttps": false,
"MapInboundClaims": false,
"GrantType": "client_credentials",
"Scope": "lingyun-abp-application",
"ClientId": "InternalServiceClient",
"ClientSecret": "1q2w3E*"
}
},
"CAP": {
"EventBus": {
"DefaultGroupName": "ProjectName",
"GroupNamePrefix": "Dev",
"Version": "v1",
"FailedRetryInterval": 300,
"FailedRetryCount": 10
},
"MySql": {
"TableNamePrefix": "ProjectName_cap",
"ConnectionString": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456"
},
"SqlServer": {
"TableNamePrefix": "ProjectName_cap",
"ConnectionString": "Server=127.0.0.1;Database=ProjectName;User Id=root;Password=123456"
},
"Sqlite": {
"TableNamePrefix": "ProjectName_cap",
"ConnectionString": "Data Source=./cap.db"
},
"Oracle": {
"TableNamePrefix": "ProjectName_cap",
"ConnectionString": "Data Source=ProjectName;Integrated Security=yes;"
},
"PostgreSql": {
"TableNamePrefix": "ProjectName_cap",
"ConnectionString": "Host=localhost;Port=5432;Database=ProjectName;User ID=root;Password=123456;"
},
"RabbitMQ": {
"HostName": "127.0.0.1",
"Port": 5672,
"UserName": "admin",
"Password": "123456",
"ExchangeName": "LINGYUN.Abp.Application",
"VirtualHost": "/"
}
},
"Redis": {
"Configuration": "127.0.0.1,defaultDatabase=10",
"InstanceName": "LINGYUN.Abp.Application"
},
"AuthServer": {
"Authority": "http://127.0.0.1:44385/",
"Audience": "lingyun-abp-application",
"MapInboundClaims": false,
"RequireHttpsMetadata": false,
"SwaggerClientId": "InternalServiceClient",
"SwaggerClientSecret": "1q2w3E*"
},
"Logging": {
"Serilog": {
"Elasticsearch": {
"IndexFormat": "abp.dev.logging-{0:yyyy.MM.dd}"
}
}
},
"AuditLogging": {
"Elasticsearch": {
"IndexPrefix": "abp.dev.auditing"
}
},
"Elasticsearch": {
"NodeUris": "http://127.0.0.1:9200"
},
"Serilog": {
"MinimumLevel": {
"Default": "Debug",
"Override": {
"System": "Warning",
"Microsoft": "Warning",
"DotNetCore": "Debug"
}
},
"WriteTo": [
{
"Name": "Console",
"Args": {
"restrictedToMinimumLevel": "Debug",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://127.0.0.1:9200",
"indexFormat": "abp.dev.logging-{0:yyyy.MM.dd}",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7"
}
}
]
}
}

88
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/appsettings.json

@ -0,0 +1,88 @@
{
"Clock": {
"Kind": "Local"
},
"Forwarded": {
"ForwardedHeaders": "XForwardedFor,XForwardedProto"
},
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",
"InitVectorBytes": "s83ng0abvd02js84",
"DefaultSalt": "sf&5)s3#"
},
"Json": {
"OutputDateTimeFormat": "yyyy-MM-dd HH:mm:ss",
"InputDateTimeFormats": [
"yyyy-MM-dd HH:mm:ss",
"yyyy-MM-ddTHH:mm:ss"
]
},
"AllowedHosts": "*",
"Serilog": {
"MinimumLevel": {
"Default": "Debug",
"Override": {
"Microsoft.EntityFrameworkCore": "Debug",
"System": "Information",
"Microsoft": "Information"
}
},
"Enrich": [ "FromLogContext", "WithProcessId", "WithThreadId", "WithEnvironmentName", "WithMachineName", "WithApplicationName", "WithUniqueId" ],
"WriteTo": [
{
"Name": "Console",
"Args": {
"initialMinimumLevel": "Verbose",
"standardErrorFromLevel": "Verbose",
"restrictedToMinimumLevel": "Verbose",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/Debug-.log",
"restrictedToMinimumLevel": "Debug",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/Info-.log",
"restrictedToMinimumLevel": "Information",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/Warn-.log",
"restrictedToMinimumLevel": "Warning",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/Error-.log",
"restrictedToMinimumLevel": "Error",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
},
{
"Name": "File",
"Args": {
"path": "Logs/Fatal-.log",
"restrictedToMinimumLevel": "Fatal",
"rollingInterval": "Day",
"outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss} [{Level:u3}] [{SourceContext}] [{ProcessId}] [{ThreadId}] - {Message:lj}{NewLine}{Exception}"
}
}
]
}
}

1
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/dapr.sh

@ -0,0 +1 @@
dapr run --app-id ProjectName --app-port 5000 -H 3500 -- dotnet run --no-build

2
aspnet-core/templates/micro/content/host/PackageName.CompanyName.ProjectName.HttpApi.Host/generate-proxy.sh

@ -0,0 +1,2 @@
cd ../src/PackageName.CompanyName.ProjectName.HttpApi.Client
abp generate-proxy -t csharp -m ProjectName -url http://127.0.0.1:5000/ --without-contracts

3
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

27
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName.CompanyName.ProjectName.Application.Contracts.csproj

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props" />
<Import Project="../../configureawait.props" />
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
<AssemblyName>PackageName.CompanyName.ProjectName.Application.Contracts</AssemblyName>
<PackageId>PackageName.CompanyName.ProjectName.Application.Contracts</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" />
<PackageReference Include="Volo.Abp.Authorization" />
<PackageReference Include="Volo.Abp.Features" />
<PackageReference Include="LINGYUN.Abp.Dynamic.Queryable.Application.Contracts" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PackageName.CompanyName.ProjectName.Domain.Shared\PackageName.CompanyName.ProjectName.Domain.Shared.csproj" />
</ItemGroup>
</Project>

18
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/Features/ProjectNameFeatureDefinitionProvider.cs

@ -0,0 +1,18 @@
using PackageName.CompanyName.ProjectName.Localization;
using Volo.Abp.Features;
using Volo.Abp.Localization;
namespace PackageName.CompanyName.ProjectName.Features;
public class ProjectNameFeatureDefinitionProvider : FeatureDefinitionProvider
{
public override void Define(IFeatureDefinitionContext context)
{
var group = context.AddGroup(ProjectNameFeatureNames.GroupName, L("Features:ProjectName"));
}
private static ILocalizableString L(string name)
{
return LocalizableString.Create<ProjectNameResource>(name);
}
}

6
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/Features/ProjectNameFeatureNames.cs

@ -0,0 +1,6 @@
namespace PackageName.CompanyName.ProjectName.Features;
public static class ProjectNameFeatureNames
{
public const string GroupName = "ProjectName";
}

10
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/IProjectNameDynamicQueryableAppService.cs

@ -0,0 +1,10 @@
using LINGYUN.Abp.Dynamic.Queryable;
namespace PackageName.CompanyName.ProjectName;
/// <summary>
/// 提供动态查询接口定义
/// </summary>
/// <typeparam name="TEntityDto">实体dto类型</typeparam>
public interface IProjectNameDynamicQueryableAppService<TEntityDto> : IDynamicQueryableAppService<TEntityDto>
{
}

22
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/Permissions/ProjectNamePermissionDefinitionProvider.cs

@ -0,0 +1,22 @@
using PackageName.CompanyName.ProjectName.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
namespace PackageName.CompanyName.ProjectName.Permissions;
public class ProjectNamePermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var group = context.AddGroup(ProjectNamePermissions.GroupName, L("Permission:ProjectName"));
group.AddPermission(
ProjectNamePermissions.ManageSettings,
L("Permission:ManageSettings"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<ProjectNameResource>(name);
}
}

8
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/Permissions/ProjectNamePermissions.cs

@ -0,0 +1,8 @@
namespace PackageName.CompanyName.ProjectName.Permissions;
public static class ProjectNamePermissions
{
public const string GroupName = "ProjectName";
public const string ManageSettings = GroupName + ".ManageSettings";
}

17
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/ProjectNameApplicationContractsModule.cs

@ -0,0 +1,17 @@
using LINGYUN.Abp.Dynamic.Queryable;
using Volo.Abp.Application;
using Volo.Abp.Authorization;
using Volo.Abp.Features;
using Volo.Abp.Modularity;
namespace PackageName.CompanyName.ProjectName;
[DependsOn(
typeof(AbpFeaturesModule),
typeof(AbpAuthorizationModule),
typeof(AbpDddApplicationContractsModule),
typeof(AbpDynamicQueryableApplicationContractsModule),
typeof(ProjectNameDomainSharedModule))]
public class ProjectNameApplicationContractsModule : AbpModule
{
}

7
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application.Contracts/PackageName/CompanyName/ProjectName/ProjectNameRemoteServiceConsts.cs

@ -0,0 +1,7 @@
namespace PackageName.CompanyName.ProjectName;
public static class ProjectNameRemoteServiceConsts
{
public const string RemoteServiceName = "ProjectName";
public const string ModuleName = "ProjectName";
}

3
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

26
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/PackageName.CompanyName.ProjectName.Application.csproj

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props" />
<Import Project="../../configureawait.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>PackageName.CompanyName.ProjectName.Application</AssemblyName>
<PackageId>PackageName.CompanyName.ProjectName.Application</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" />
<PackageReference Include="LINGYUN.Abp.Dynamic.Queryable.Application" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PackageName.CompanyName.ProjectName.Application.Contracts\PackageName.CompanyName.ProjectName.Application.Contracts.csproj" />
<ProjectReference Include="..\PackageName.CompanyName.ProjectName.Domain\PackageName.CompanyName.ProjectName.Domain.csproj" />
</ItemGroup>
</Project>

13
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/PackageName/CompanyName/ProjectName/ProjectNameAppServiceBase.cs

@ -0,0 +1,13 @@
using PackageName.CompanyName.ProjectName.Localization;
using Volo.Abp.Application.Services;
namespace PackageName.CompanyName.ProjectName;
public abstract class ProjectNameAppServiceBase : ApplicationService
{
protected ProjectNameAppServiceBase()
{
LocalizationResource = typeof(ProjectNameResource);
ObjectMapperContext = typeof(ProjectNameApplicationModule);
}
}

10
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/PackageName/CompanyName/ProjectName/ProjectNameApplicationMapperProfile.cs

@ -0,0 +1,10 @@
using AutoMapper;
namespace PackageName.CompanyName.ProjectName;
public class ProjectNameApplicationMapperProfile : Profile
{
public ProjectNameApplicationMapperProfile()
{
}
}

27
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/PackageName/CompanyName/ProjectName/ProjectNameApplicationModule.cs

@ -0,0 +1,27 @@
using LINGYUN.Abp.Dynamic.Queryable;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Authorization;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace PackageName.CompanyName.ProjectName;
[DependsOn(
typeof(AbpAuthorizationModule),
typeof(AbpDddApplicationModule),
typeof(ProjectNameDomainModule),
typeof(ProjectNameApplicationContractsModule),
typeof(AbpDynamicQueryableApplicationModule))]
public class ProjectNameApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<ProjectNameApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<ProjectNameApplicationMapperProfile>(validate: true);
});
}
}

19
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/PackageName/CompanyName/ProjectName/ProjectNameDynamicQueryableAppServiceBase.cs

@ -0,0 +1,19 @@
using LINGYUN.Abp.Dynamic.Queryable;
using PackageName.CompanyName.ProjectName.Localization;
namespace PackageName.CompanyName.ProjectName;
/// <summary>
/// 提供动态查询接口实现
/// </summary>
/// <typeparam name="TEntity">实体类型</typeparam>
/// <typeparam name="TEntityDto">实体dto类型</typeparam>
public abstract class ProjectNameDynamicQueryableAppServiceBase<TEntity, TEntityDto> :
DynamicQueryableAppService<TEntity, TEntityDto>,
IProjectNameDynamicQueryableAppService<TEntityDto>
{
protected ProjectNameDynamicQueryableAppServiceBase()
{
LocalizationResource = typeof(ProjectNameResource);
ObjectMapperContext = typeof(ProjectNameApplicationModule);
}
}

32
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Application/System/Linq/Expressions/ExpressionFuncExtensions.cs

@ -0,0 +1,32 @@
using Volo.Abp.Specifications;
namespace System.Linq.Expressions;
internal static class ExpressionFuncExtensions
{
public static Expression<Func<T, bool>> AndIf<T>(
this Expression<Func<T, bool>> first,
bool condition,
Expression<Func<T, bool>> second)
{
if (condition)
{
return ExpressionFuncExtender.And(first, second);
}
return first;
}
public static Expression<Func<T, bool>> OrIf<T>(
this Expression<Func<T, bool>> first,
bool condition,
Expression<Func<T, bool>> second)
{
if (condition)
{
return ExpressionFuncExtender.Or(first, second);
}
return first;
}
}

3
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Dapr.Client/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Dapr.Client/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

19
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Dapr.Client/PackageName.CompanyName.ProjectName.Dapr.Client.csproj

@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props" />
<Import Project="../../configureawait.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LINGYUN.Abp.Dapr.Client" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PackageName.CompanyName.ProjectName.Application.Contracts\PackageName.CompanyName.ProjectName.Application.Contracts.csproj" />
</ItemGroup>
</Project>

18
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Dapr.Client/PackageName/CompanyName/ProjectName/ProjectNameDaprClientModule.cs

@ -0,0 +1,18 @@
using LINGYUN.Abp.Dapr.Client;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace PackageName.CompanyName.ProjectName;
[DependsOn(
typeof(AbpDaprClientModule),
typeof(ProjectNameApplicationContractsModule))]
public class ProjectNameDaprClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddStaticDaprClientProxies(
typeof(ProjectNameApplicationContractsModule).Assembly,
ProjectNameRemoteServiceConsts.RemoteServiceName);
}
}

3
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

30
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName.CompanyName.ProjectName.Domain.Shared.csproj

@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props" />
<Import Project="../../configureawait.props" />
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
<AssemblyName>PackageName.CompanyName.ProjectName.Domain.Shared</AssemblyName>
<PackageId>PackageName.CompanyName.ProjectName.Domain.Shared</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="PackageName\CompanyName\ProjectName\Localization\Resources\*.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="PackageName\CompanyName\ProjectName\Localization\Resources\*.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Auditing" />
<PackageReference Include="Volo.Abp.EventBus" />
<PackageReference Include="Volo.Abp.Localization" />
</ItemGroup>
</Project>

8
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/Localization/ProjectNameResource.cs

@ -0,0 +1,8 @@
using Volo.Abp.Localization;
namespace PackageName.CompanyName.ProjectName.Localization;
[LocalizationResourceName("ProjectName")]
public class ProjectNameResource
{
}

8
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/Localization/Resources/en.json

@ -0,0 +1,8 @@
{
"culture": "en",
"texts": {
"Features:ProjectName": "ProjectName",
"Permission:ProjectName": "ProjectName",
"Permission:ManageSettings": "Manage Settings"
}
}

8
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/Localization/Resources/zh-Hans.json

@ -0,0 +1,8 @@
{
"culture": "zh-Hans",
"texts": {
"Features:ProjectName": "ProjectName",
"Permission:ProjectName": "ProjectName",
"Permission:ManageSettings": "管理设置"
}
}

16
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/ObjectExtending/ProjectNameModuleExtensionConfiguration.cs

@ -0,0 +1,16 @@
using System;
using Volo.Abp.ObjectExtending.Modularity;
namespace PackageName.CompanyName.ProjectName.ObjectExtending;
public class ProjectNameModuleExtensionConfiguration : ModuleExtensionConfiguration
{
public ProjectNameModuleExtensionConfiguration ConfigureProjectName(
Action<EntityExtensionConfiguration> configureAction)
{
return this.ConfigureEntity(
ProjectNameModuleExtensionConsts.EntityNames.Entity,
configureAction
);
}
}

19
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/ObjectExtending/ProjectNameModuleExtensionConfigurationDictionaryExtensions.cs

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using Volo.Abp.ObjectExtending.Modularity;
namespace PackageName.CompanyName.ProjectName.ObjectExtending;
public static class ProjectNameModuleExtensionConfigurationDictionaryExtensions
{
public static ModuleExtensionConfigurationDictionary ConfigureProjectName(
this ModuleExtensionConfigurationDictionary modules,
Action<ProjectNameModuleExtensionConfiguration> configureAction)
{
return modules.ConfigureModule(
ProjectNameModuleExtensionConsts.ModuleName,
configureAction
);
}
}

11
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/ObjectExtending/ProjectNameModuleExtensionConsts.cs

@ -0,0 +1,11 @@
namespace PackageName.CompanyName.ProjectName.ObjectExtending;
public static class ProjectNameModuleExtensionConsts
{
public const string ModuleName = "ProjectName";
public static class EntityNames
{
public const string Entity = "Entity";
}
}

32
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/ProjectNameDomainSharedModule.cs

@ -0,0 +1,32 @@
using PackageName.CompanyName.ProjectName.Localization;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace PackageName.CompanyName.ProjectName;
[DependsOn(
typeof(AbpLocalizationModule))]
public class ProjectNameDomainSharedModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<ProjectNameDomainSharedModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<ProjectNameResource>()
.AddVirtualJson("/PackageName/CompanyName/ProjectName/Localization/Resources");
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace(ProjectNameErrorCodes.Namespace, typeof(ProjectNameResource));
});
}
}

6
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain.Shared/PackageName/CompanyName/ProjectName/ProjectNameErrorCodes.cs

@ -0,0 +1,6 @@
namespace PackageName.CompanyName.ProjectName;
public static class ProjectNameErrorCodes
{
public const string Namespace = "ProjectName";
}

3
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

27
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName.CompanyName.ProjectName.Domain.csproj

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props" />
<Import Project="../../configureawait.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>PackageName.CompanyName.ProjectName.Domain</AssemblyName>
<PackageId>PackageName.CompanyName.ProjectName.Domain</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Caching" />
<PackageReference Include="Volo.Abp.Ddd.Domain" />
<PackageReference Include="LINGYUN.Abp.DataProtection" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PackageName.CompanyName.ProjectName.Domain.Shared\PackageName.CompanyName.ProjectName.Domain.Shared.csproj" />
</ItemGroup>
</Project>

54
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/IProjectNameBasicRepository.cs

@ -0,0 +1,54 @@
using LINGYUN.Abp.DataProtection;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Specifications;
namespace PackageName.CompanyName.ProjectName;
/// <summary>
/// 基本仓储接口
/// </summary>
/// <typeparam name="TEntity">实体类型</typeparam>
/// <typeparam name="TKey">实体主键类型</typeparam>
public interface IProjectNameBasicRepository<TEntity, TKey> : IDataProtectionRepository<TEntity>
where TEntity : class, IEntity<TKey>
{
/// <summary>
/// 获取过滤后的实体数量
/// </summary>
/// <param name="specification"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<int> GetCountAsync(
ISpecification<TEntity> specification,
CancellationToken cancellationToken = default);
/// <summary>
/// 获取过滤后的实体列表(分页)
/// </summary>
/// <param name="specification"></param>
/// <param name="sorting"></param>
/// <param name="maxResultCount"></param>
/// <param name="skipCount"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<List<TEntity>> GetListAsync(
ISpecification<TEntity> specification,
string sorting = nameof(IEntity<TKey>.Id),
int maxResultCount = 10,
int skipCount = 0,
CancellationToken cancellationToken = default);
/// <summary>
/// 获取过滤后的实体列表
/// </summary>
/// <param name="specification"></param>
/// <param name="sorting"></param>
/// <param name="maxResultCount"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
Task<List<TEntity>> GetListAsync(
ISpecification<TEntity> specification,
string sorting = nameof(IEntity<TKey>.Id),
int maxResultCount = 10,
CancellationToken cancellationToken = default);
}

11
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/ProjectNameDbProperties.cs

@ -0,0 +1,11 @@
namespace PackageName.CompanyName.ProjectName;
public static class ProjectNameDbProperties
{
public static string DbTablePrefix { get; set; } = "ProjectName_";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "ProjectName";
}

11
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/ProjectNameDomainMapperProfile.cs

@ -0,0 +1,11 @@
using AutoMapper;
namespace PackageName.CompanyName.ProjectName;
public class ProjectNameDomainMapperProfile : Profile
{
public ProjectNameDomainMapperProfile()
{
}
}

45
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/ProjectNameDomainModule.cs

@ -0,0 +1,45 @@
using LINGYUN.Abp.DataProtection;
using Microsoft.Extensions.DependencyInjection;
using PackageName.CompanyName.ProjectName.ObjectExtending;
using Volo.Abp.AutoMapper;
using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending.Modularity;
using Volo.Abp.Threading;
namespace PackageName.CompanyName.ProjectName;
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(AbpDataProtectionModule),
typeof(ProjectNameDomainSharedModule))]
public class ProjectNameDomainModule : AbpModule
{
private static readonly OneTimeRunner OneTimeRunner = new();
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<ProjectNameDomainModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<ProjectNameDomainMapperProfile>(validate: true);
});
Configure<AbpDistributedEntityEventOptions>(options =>
{
});
}
public override void PostConfigureServices(ServiceConfigurationContext context)
{
OneTimeRunner.Run(() =>
{
// 扩展实体配置
//ModuleExtensionConfigurationHelper.ApplyEntityConfigurationToEntity(
// ProjectNameModuleExtensionConsts.ModuleName,
// ProjectNameModuleExtensionConsts.EntityNames.Entity,
// typeof(Entity)
//);
});
}
}

10
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/Settings/ProjectNameSettingDefinitionProvider.cs

@ -0,0 +1,10 @@
using Volo.Abp.Settings;
namespace PackageName.CompanyName.ProjectName.Settings;
public class ProjectNameSettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
}
}

6
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/PackageName/CompanyName/ProjectName/Settings/ProjectNameSettings.cs

@ -0,0 +1,6 @@
namespace PackageName.CompanyName.ProjectName.Settings;
public static class ProjectNameSettings
{
public const string GroupName = "ProjectName";
}

32
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.Domain/System/Linq/Expressions/ExpressionFuncExtensions.cs

@ -0,0 +1,32 @@
using Volo.Abp.Specifications;
namespace System.Linq.Expressions;
internal static class ExpressionFuncExtensions
{
public static Expression<Func<T, bool>> AndIf<T>(
this Expression<Func<T, bool>> first,
bool condition,
Expression<Func<T, bool>> second)
{
if (condition)
{
return ExpressionFuncExtender.And(first, second);
}
return first;
}
public static Expression<Func<T, bool>> OrIf<T>(
this Expression<Func<T, bool>> first,
bool condition,
Expression<Func<T, bool>> second)
{
if (condition)
{
return ExpressionFuncExtender.Or(first, second);
}
return first;
}
}

3
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

37
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName.CompanyName.ProjectName.EntityFrameworkCore.csproj

@ -0,0 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props" />
<Import Project="../../configureawait.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>PackageName.CompanyName.ProjectName.EntityFrameworkCore</AssemblyName>
<PackageId>PackageName.CompanyName.ProjectName.EntityFrameworkCore</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySql" Condition="'$(MySQL)'=='true'" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Condition="'$(SqlServer)'=='true'" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.Sqlite" Condition="'$(Sqlite)'=='true'" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.Oracle" Condition="'$(Oracle)'=='true'" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.Oracle.Devart" Condition="'$(OracleDevart)'=='true'" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Condition="'$(PostgreSql)'=='true'" />
<PackageReference Include="LINGYUN.Abp.Data.DbMigrator" />
<PackageReference Include="LINGYUN.Abp.DataProtection.EntityFrameworkCore" />
<PackageReference Include="LINGYUN.Abp.Saas.EntityFrameworkCore" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PackageName.CompanyName.ProjectName.Domain\PackageName.CompanyName.ProjectName.Domain.csproj" />
</ItemGroup>
</Project>

77
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/EfCoreProjectNameRepository.cs

@ -0,0 +1,77 @@
using LINGYUN.Abp.DataProtection;
using LINGYUN.Abp.DataProtection.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Specifications;
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
/// <summary>
/// 实现基本接口
/// </summary>
/// <typeparam name="TEntity">实体类型</typeparam>
/// <typeparam name="TKey">实体主键类型</typeparam>
public abstract class EfCoreProjectNameRepository<TEntity, TKey> :
EfCoreDataProtectionRepository<IProjectNameDbContext, TEntity, TKey>,
IProjectNameBasicRepository<TEntity, TKey>
where TEntity : class, IEntity<TKey>
{
protected EfCoreProjectNameRepository(
IDbContextProvider<IProjectNameDbContext> dbContextProvider,
IDataAuthorizationService dataAuthorizationService,
IEntityTypeFilterBuilder entityTypeFilterBuilder)
: base(dbContextProvider, dataAuthorizationService, entityTypeFilterBuilder)
{
}
public async virtual Task<int> GetCountAsync(
ISpecification<TEntity> specification,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.CountAsync(GetCancellationToken(cancellationToken));
}
public async virtual Task<List<TEntity>> GetListAsync(
ISpecification<TEntity> specification,
string sorting = nameof(IEntity<TKey>.Id),
int maxResultCount = 10,
int skipCount = 0,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.OrderBy(GetSortingOrDefault(sorting))
.PageBy(skipCount, maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}
public async virtual Task<List<TEntity>> GetListAsync(
ISpecification<TEntity> specification,
string sorting = nameof(IEntity<TKey>.Id),
int maxResultCount = 10,
CancellationToken cancellationToken = default)
{
return await (await GetDbSetAsync())
.Where(specification.ToExpression())
.OrderBy(GetSortingOrDefault(sorting))
.Take(maxResultCount)
.ToListAsync(GetCancellationToken(cancellationToken));
}
protected virtual string GetSortingOrDefault(string sorting = nameof(IEntity<TKey>.Id))
{
if (sorting.IsNullOrWhiteSpace())
{
return nameof(IEntity<TKey>.Id);
}
return sorting;
}
}

9
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/IProjectNameDbContext.cs

@ -0,0 +1,9 @@
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
[ConnectionStringName(ProjectNameDbProperties.ConnectionStringName)]
public interface IProjectNameDbContext : IEfCoreDbContext
{
}

21
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbContext.cs

@ -0,0 +1,21 @@
using LINGYUN.Abp.DataProtection.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
[ConnectionStringName(ProjectNameDbProperties.ConnectionStringName)]
public class ProjectNameDbContext : AbpDataProtectionDbContext<ProjectNameDbContext>, IProjectNameDbContext
{
public ProjectNameDbContext(
DbContextOptions<ProjectNameDbContext> options) : base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ConfigureProjectName();
}
}

49
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbContextFactory.cs

@ -0,0 +1,49 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using System.IO;
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
public class ProjectNameDbContextFactory : IDesignTimeDbContextFactory<ProjectNameDbContext>
{
public ProjectNameDbContext CreateDbContext(string[] args)
{
var configuration = BuildConfiguration();
var connectionString = configuration.GetConnectionString("ProjectName");
DbContextOptionsBuilder<ProjectNameDbContext> builder = null;
#if MySQL
builder = new DbContextOptionsBuilder<ProjectNameDbContext>()
.UseMySql(connectionString, ServerVersion.AutoDetect(connectionString));
#elif SqlServer
builder = new DbContextOptionsBuilder<ProjectNameDbContext>()
.UseSqlServer(connectionString);
#elif Sqlite
builder = new DbContextOptionsBuilder<ProjectNameDbContext>()
.UseSqlite(connectionString);
#elif Oracle
builder = new DbContextOptionsBuilder<ProjectNameDbContext>()
.UseOracle(connectionString);
#elif OracleDevart
builder = (DbContextOptionsBuilder<ProjectNameDbContext>) new DbContextOptionsBuilder<ProjectNameDbContext>()
.UseOracle(connectionString);
#elif PostgreSql
builder = new DbContextOptionsBuilder<ProjectNameDbContext>()
.UseNpgsql(connectionString);
#endif
return new ProjectNameDbContext(builder!.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../PackageName.CompanyName.ProjectName.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false)
.AddJsonFile("appsettings.Development.json", optional: true);
return builder.Build();
}
}

21
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbContextModelCreatingExtensions.cs

@ -0,0 +1,21 @@
using Microsoft.EntityFrameworkCore;
using System;
using Volo.Abp;
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
public static class ProjectNameDbContextModelCreatingExtensions
{
public static void ConfigureProjectName(
this ModelBuilder builder,
Action<ProjectNameModelBuilderConfigurationOptions> optionsAction = null)
{
Check.NotNull(builder, nameof(builder));
var options = new ProjectNameModelBuilderConfigurationOptions(
ProjectNameDbProperties.DbTablePrefix,
ProjectNameDbProperties.DbSchema
);
optionsAction?.Invoke(options);
}
}

36
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbMigrationEventHandler.cs

@ -0,0 +1,36 @@
using Microsoft.Extensions.Logging;
using System;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DistributedLocking;
using Volo.Abp.EntityFrameworkCore.Migrations;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Uow;
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
public class ProjectNameDbMigrationEventHandler : EfCoreDatabaseMigrationEventHandlerBase<ProjectNameDbContext>
{
protected IDataSeeder DataSeeder { get; }
public ProjectNameDbMigrationEventHandler(
IDataSeeder dataSeeder,
ITenantStore tenantStore,
ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager,
IAbpDistributedLock abpDistributedLock,
IDistributedEventBus distributedEventBus,
ILoggerFactory loggerFactory)
: base(
ConnectionStringNameAttribute.GetConnStringName<ProjectNameDbContext>(),
currentTenant, unitOfWorkManager, tenantStore, abpDistributedLock, distributedEventBus, loggerFactory)
{
DataSeeder = dataSeeder;
}
protected async override Task SeedAsync(Guid? tenantId)
{
await DataSeeder.SeedAsync(tenantId);
}
}

58
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameDbMigrationService.cs

@ -0,0 +1,58 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.Saas.Tenants;
using Microsoft.Extensions.Logging;
using System;
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.DistributedLocking;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Uow;
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
public class ProjectNameDbMigrationService : EfCoreRuntimeDbMigratorBase<ProjectNameDbContext>, ITransientDependency
{
protected IDataSeeder DataSeeder { get; }
protected IDbSchemaMigrator DbSchemaMigrator { get; }
protected ITenantRepository TenantRepository { get; }
public ProjectNameDbMigrationService(
IDataSeeder dataSeeder,
IDbSchemaMigrator dbSchemaMigrator,
ITenantRepository tenantRepository,
ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager,
IServiceProvider serviceProvider,
IAbpDistributedLock abpDistributedLock,
IDistributedEventBus distributedEventBus,
ILoggerFactory loggerFactory)
: base(
ConnectionStringNameAttribute.GetConnStringName<ProjectNameDbContext>(),
unitOfWorkManager, serviceProvider, currentTenant, abpDistributedLock, distributedEventBus, loggerFactory)
{
DataSeeder = dataSeeder;
DbSchemaMigrator = dbSchemaMigrator;
TenantRepository = tenantRepository;
}
protected async override Task LockAndApplyDatabaseMigrationsAsync()
{
await base.LockAndApplyDatabaseMigrationsAsync();
var tenants = await TenantRepository.GetListAsync();
foreach (var tenant in tenants.Where(x => x.IsActive))
{
await LockAndApplyDatabaseWithTenantMigrationsAsync(tenant.Id);
}
}
protected async override Task SeedAsync()
{
Logger.LogInformation($"Executing {(!CurrentTenant.IsAvailable ? "host" : CurrentTenant.Name ?? CurrentTenant.GetId().ToString())} database seed...");
await DataSeeder.SeedAsync(CurrentTenant.Id);
}
}

6
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameEfCoreQueryableExtensions.cs

@ -0,0 +1,6 @@
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
public static class ProjectNameEfCoreQueryableExtensions
{
// 在此聚合仓储服务的扩展方法
}

76
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameEntityFrameworkCoreModule.cs

@ -0,0 +1,76 @@
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.DataProtection.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;
#if MySQL
using Volo.Abp.EntityFrameworkCore.MySQL;
#elif SqlServer
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Microsoft.EntityFrameworkCore.Infrastructure;
#elif Sqlite
using Volo.Abp.EntityFrameworkCore.Sqlite;
#elif Oracle
using Volo.Abp.EntityFrameworkCore.Oracle;
#elif OracleDevart
using Volo.Abp.EntityFrameworkCore.Oracle.Devart;
#elif PostgreSql
using Volo.Abp.EntityFrameworkCore.PostgreSql;
#endif
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
[DependsOn(
typeof(ProjectNameDomainModule),
typeof(AbpDataDbMigratorModule),
typeof(AbpDataProtectionEntityFrameworkCoreModule),
#if MySQL
typeof(AbpEntityFrameworkCoreMySQLModule),
#elif SqlServer
typeof(AbpEntityFrameworkCoreSqlServerModule),
#elif Sqlite
typeof(AbpEntityFrameworkCoreSqliteModule),
#elif Oracle
typeof(AbpEntityFrameworkCoreOracleModule),
#elif OracleDevart
typeof(AbpEntityFrameworkCoreOracleDevartModule),
#elif PostgreSql
typeof(AbpEntityFrameworkCorePostgreSqlModule),
#endif
typeof(AbpSaasEntityFrameworkCoreModule))]
public class ProjectNameEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
// 配置Ef
Configure<AbpDbContextOptions>(options =>
{
#if MySQL
options.UseMySQL();
options.UseMySQL<ProjectNameDbContext>();
#elif SqlServer
options.UseSqlServer();
options.UseSqlServer<ProjectNameDbContext>(builder =>
{
// see https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-level?view=sql-server-ver16
// builder.UseCompatibilityLevel(150);
});
#elif Sqlite
options.UseSqlite();
options.UseSqlite<ProjectNameDbContext>();
#elif Oracle || OracleDevart
options.UseOracle();
options.UseOracle<ProjectNameDbContext>();
#elif PostgreSql
options.UseNpgsql();
options.UseNpgsql<ProjectNameDbContext>();
#endif
});
context.Services.AddAbpDbContext<ProjectNameDbContext>(options =>
{
options.AddDefaultRepositories<IProjectNameDbContext>();
});
}
}

17
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.EntityFrameworkCore/PackageName/CompanyName/ProjectName/EntityFrameworkCore/ProjectNameModelBuilderConfigurationOptions.cs

@ -0,0 +1,17 @@
using JetBrains.Annotations;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace PackageName.CompanyName.ProjectName.EntityFrameworkCore;
public class ProjectNameModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions
{
public ProjectNameModelBuilderConfigurationOptions(
[NotNull] string tablePrefix = "",
[CanBeNull] string schema = null)
: base(
tablePrefix,
schema)
{
}
}

3
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi.Client/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi.Client/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

24
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi.Client/PackageName.CompanyName.ProjectName.HttpApi.Client.csproj

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props" />
<Import Project="../../configureawait.props" />
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
<AssemblyName>PackageName.CompanyName.ProjectName.HttpApi.Client</AssemblyName>
<PackageId>PackageName.CompanyName.ProjectName.HttpApi.Client</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PackageName.CompanyName.ProjectName.Application.Contracts\PackageName.CompanyName.ProjectName.Application.Contracts.csproj" />
</ItemGroup>
</Project>

18
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi.Client/PackageName/CompanyName/ProjectName/ProjectNameHttpApiClientModule.cs

@ -0,0 +1,18 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
namespace PackageName.CompanyName.ProjectName;
[DependsOn(
typeof(AbpHttpClientModule),
typeof(ProjectNameApplicationContractsModule))]
public class ProjectNameHttpApiClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddStaticHttpClientProxies(
typeof(ProjectNameApplicationContractsModule).Assembly,
ProjectNameRemoteServiceConsts.RemoteServiceName);
}
}

3
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

25
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/PackageName.CompanyName.ProjectName.HttpApi.csproj

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props" />
<Import Project="../../configureawait.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>PackageName.CompanyName.ProjectName.HttpApi</AssemblyName>
<PackageId>PackageName.CompanyName.ProjectName.HttpApi</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" />
<PackageReference Include="LINGYUN.Abp.Dynamic.Queryable.HttpApi" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PackageName.CompanyName.ProjectName.Application.Contracts\PackageName.CompanyName.ProjectName.Application.Contracts.csproj" />
</ItemGroup>
</Project>

12
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/PackageName/CompanyName/ProjectName/ProjectNameControllerBase.cs

@ -0,0 +1,12 @@
using PackageName.CompanyName.ProjectName.Localization;
using Volo.Abp.AspNetCore.Mvc;
namespace PackageName.CompanyName.ProjectName;
public abstract class ProjectNameControllerBase : AbpControllerBase
{
protected ProjectNameControllerBase()
{
LocalizationResource = typeof(ProjectNameResource);
}
}

17
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/PackageName/CompanyName/ProjectName/ProjectNameDynamicQueryableControllerBase.cs

@ -0,0 +1,17 @@
using LINGYUN.Abp.Dynamic.Queryable;
using PackageName.CompanyName.ProjectName.Localization;
namespace PackageName.CompanyName.ProjectName;
/// <summary>
/// 提供动态查询控制器实现
/// </summary>
/// <typeparam name="TEntityDto">实体dto类型</typeparam>
public abstract class ProjectNameDynamicQueryableControllerBase<TEntityDto> : DynamicQueryableControllerBase<TEntityDto>
{
protected ProjectNameDynamicQueryableControllerBase(
IDynamicQueryableAppService<TEntityDto> service)
: base(service)
{
LocalizationResource = typeof(ProjectNameResource);
}
}

42
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.HttpApi/PackageName/CompanyName/ProjectName/ProjectNameHttpApiModule.cs

@ -0,0 +1,42 @@
using PackageName.CompanyName.ProjectName.Localization;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.Validation.Localization;
using LINGYUN.Abp.Dynamic.Queryable;
namespace PackageName.CompanyName.ProjectName;
[DependsOn(
typeof(AbpAspNetCoreMvcModule),
typeof(ProjectNameApplicationContractsModule),
typeof(AbpDynamicQueryableHttpApiModule))]
public class ProjectNameHttpApiModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IMvcBuilder>(mvcBuilder =>
{
mvcBuilder.AddApplicationPartIfNotExists(typeof(ProjectNameHttpApiModule).Assembly);
});
PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(
typeof(ProjectNameResource),
typeof(ProjectNameApplicationContractsModule).Assembly);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<ProjectNameResource>()
.AddBaseTypes(typeof(AbpValidationResource));
});
}
}

3
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.SettingManagement/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.SettingManagement/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

27
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.SettingManagement/PackageName.CompanyName.ProjectName.SettingManagement.csproj

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../../common.props" />
<Import Project="../../configureawait.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>PackageName.CompanyName.ProjectName.SettingManagement</AssemblyName>
<PackageId>PackageName.CompanyName.ProjectName.SettingManagement</PackageId>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain" />
<PackageReference Include="LINGYUN.Abp.SettingManagement.Application.Contracts" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PackageName.CompanyName.ProjectName.Application.Contracts\PackageName.CompanyName.ProjectName.Application.Contracts.csproj" />
<ProjectReference Include="..\PackageName.CompanyName.ProjectName.Domain\PackageName.CompanyName.ProjectName.Domain.csproj" />
</ItemGroup>
</Project>

7
aspnet-core/templates/micro/content/src/PackageName.CompanyName.ProjectName.SettingManagement/PackageName/CompanyName/ProjectName/SettingManagement/IProjectNameSettingAppService.cs

@ -0,0 +1,7 @@
using LINGYUN.Abp.SettingManagement;
namespace PackageName.CompanyName.ProjectName.SettingManagement;
public interface IProjectNameSettingAppService : ISettingAppService, IUserSettingAppService
{
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save