Browse Source

feat(demo): 单体项目增加demo服务演示

pull/1013/head
colin 1 year ago
parent
commit
8c64536971
  1. 158
      aspnet-core/LINGYUN.MicroService.SingleProject.sln
  2. 3
      aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/appsettings.Development.json
  3. 3
      aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/appsettings.json
  4. 1
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/LY.MicroService.Applications.Single.EntityFrameworkCore.csproj
  5. 5539
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240929080118_Add-Demo-Module.Designer.cs
  6. 95
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240929080118_Add-Demo-Module.cs
  7. 133
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/SingleMigrationsDbContextModelSnapshot.cs
  8. 5
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/SingleMigrationsDbContext.cs
  9. 3
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/FodyWeavers.xml
  10. 30
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/FodyWeavers.xsd
  11. 27
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN.Abp.Demo.Application.Contracts.csproj
  12. 15
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/AbpDemoApplicationContractsModule.cs
  13. 12
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Authors/AuthorDto.cs
  14. 15
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Authors/CreateAuthorDto.cs
  15. 7
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Authors/GetAuthorListDto.cs
  16. 18
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Authors/IAuthorAppService.cs
  17. 15
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Authors/UpdateAuthorDto.cs
  18. 8
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/AuthorLookupDto.cs
  19. 24
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/BookDto.cs
  20. 11
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/BookExportListInput.cs
  21. 30
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/BookImportDto.cs
  22. 9
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/BookImportInput.cs
  23. 22
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/CreateUpdateBookDto.cs
  24. 18
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/IBookAppService.cs
  25. 6
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/DemoRemoteServiceConsts.cs
  26. 34
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Permissions/DemoPermissionDefinitionProvider.cs
  27. 25
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Permissions/DemoPermissions.cs
  28. 3
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/FodyWeavers.xml
  29. 30
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/FodyWeavers.xsd
  30. 28
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN.Abp.Demo.Application.csproj
  31. 25
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/AbpDemoApplicationModule.cs
  32. 89
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/Authors/AuthorAppService.cs
  33. 206
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/Books/BookAppService.cs
  34. 26
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/DemoApplicationMapperProfile.cs
  35. 11
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/DemoApplicationServiceBase.cs
  36. 3
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/FodyWeavers.xml
  37. 30
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/FodyWeavers.xsd
  38. 30
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN.Abp.Demo.Domain.Shared.csproj
  39. 31
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/AbpDemoDomainSharedModule.cs
  40. 5
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/Authors/AuthorConsts.cs
  41. 13
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/Books/BookType.cs
  42. 14
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/DemoErrorCodes.cs
  43. 8
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/Localization/DemoResource.cs
  44. 16
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/Localization/Resources/en.json
  45. 16
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/Localization/Resources/zh-Hans.json
  46. 3
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/FodyWeavers.xml
  47. 30
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/FodyWeavers.xsd
  48. 28
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN.Abp.Demo.Domain.csproj
  49. 37
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/AbpDemoDomainModule.cs
  50. 43
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Authors/Author.cs
  51. 11
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Authors/AuthorAlreadyExistsException.cs
  52. 51
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Authors/AuthorManager.cs
  53. 14
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Authors/IAuthorRepository.cs
  54. 16
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Books/Book.cs
  55. 6
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Books/IBookRepository.cs
  56. 10
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/DemoDbProterties.cs
  57. 10
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/DemoDomainMapperProfile.cs
  58. 3
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/FodyWeavers.xml
  59. 30
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/FodyWeavers.xsd
  60. 23
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN.Abp.Demo.EntityFrameworkCore.csproj
  61. 41
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/Authors/EfCoreAuthorRepository.cs
  62. 17
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/Books/EfCoreBookRepository.cs
  63. 25
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/EntityFrameworkCore/AbpDemoEntityFrameworkCoreModule.cs
  64. 24
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/EntityFrameworkCore/DemoDbContext.cs
  65. 45
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/EntityFrameworkCore/DemoDbContextModelCreatingExtensions.cs
  66. 16
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/EntityFrameworkCore/DemoModelBuilderConfigurationOptions.cs
  67. 3
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/FodyWeavers.xml
  68. 30
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/FodyWeavers.xsd
  69. 26
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/LINGYUN.Abp.Demo.HttpApi.csproj
  70. 28
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/LINGYUN/Abp/Demo/AbpDemoHttpApiModule.cs
  71. 58
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/LINGYUN/Abp/Demo/Authors/AuthorController.cs
  72. 81
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/LINGYUN/Abp/Demo/Books/BookController.cs
  73. 68
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs
  74. 37
      aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs
  75. 6
      aspnet-core/services/LY.MicroService.Applications.Single/appsettings.Development.json

158
aspnet-core/LINGYUN.MicroService.SingleProject.sln

@ -425,6 +425,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\Directory.Build.props = ..\Directory.Build.props
..\Directory.Packages.props = ..\Directory.Packages.props
..\NuGet.Config = ..\NuGet.Config
..\README.en.md = ..\README.en.md
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dapr", "dapr", "{FD9F5933-FDE5-4504-99BF-9050E0435C6D}"
@ -539,13 +541,61 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.WeChat.Work.Han
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.MultiTenancy.Saas", "modules\saas\LINGYUN.Abp.MultiTenancy.Saas\LINGYUN.Abp.MultiTenancy.Saas.csproj", "{E3C07A77-EAF9-4A3F-8814-7D2F116C8E26}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.IP2Region", "framework\common\LINGYUN.Abp.IP2Region\LINGYUN.Abp.IP2Region.csproj", "{DA54E88E-C43E-4E31-92D0-08A753F2C08D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IP2Region", "framework\common\LINGYUN.Abp.IP2Region\LINGYUN.Abp.IP2Region.csproj", "{DA54E88E-C43E-4E31-92D0-08A753F2C08D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TestsBase", "tests\LINGYUN.Abp.TestBase\LINGYUN.Abp.TestsBase.csproj", "{A7417E7F-DB97-48DB-B849-AFC15854A6E7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Aliyun.Tests", "tests\LINGYUN.Abp.Aliyun.Tests\LINGYUN.Abp.Aliyun.Tests.csproj", "{8DDE4291-BC57-4C56-9871-B982462F4C3D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.IP2Region.Tests", "tests\LINGYUN.Abp.IP2Region.Tests\LINGYUN.Abp.IP2Region.Tests.csproj", "{C5D64A2B-7E7E-4509-9F31-425D59712E6F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.IP2Region.Tests", "tests\LINGYUN.Abp.IP2Region.Tests\LINGYUN.Abp.IP2Region.Tests.csproj", "{C5D64A2B-7E7E-4509-9F31-425D59712E6F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "data-protection", "data-protection", "{07C2FB08-985C-42FE-85AF-38E40A301668}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.DataProtection.Abstractions", "framework\data-protection\LINGYUN.Abp.DataProtection.Abstractions\LINGYUN.Abp.DataProtection.Abstractions.csproj", "{A52C54FB-C96D-4032-8588-AFC2CD158D23}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.DataProtection", "framework\data-protection\LINGYUN.Abp.DataProtection\LINGYUN.Abp.DataProtection.csproj", "{B05ED61E-9A36-4E90-B876-F48559E018A6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.DataProtection.EntityFrameworkCore", "framework\data-protection\LINGYUN.Abp.DataProtection.EntityFrameworkCore\LINGYUN.Abp.DataProtection.EntityFrameworkCore.csproj", "{1E8DE890-F27F-4A1A-B356-0B6B9D3B1EF7}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "data-protection", "data-protection", "{4FCD7337-4320-412D-9BC8-A0B243BC27B3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.DataProtectionManagement.Domain.Shared", "modules\data-protection\LINGYUN.Abp.DataProtectionManagement.Domain.Shared\LINGYUN.Abp.DataProtectionManagement.Domain.Shared.csproj", "{9D2C789C-8241-4F53-AFEF-F2AB15BAA823}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.DataProtectionManagement.Domain", "modules\data-protection\LINGYUN.Abp.DataProtectionManagement.Domain\LINGYUN.Abp.DataProtectionManagement.Domain.csproj", "{36AEA095-E34D-43F5-8000-9FA3A696C312}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.DataProtectionManagement.Application.Contracts", "modules\data-protection\LINGYUN.Abp.DataProtectionManagement.Application.Contracts\LINGYUN.Abp.DataProtectionManagement.Application.Contracts.csproj", "{2D5A9AB0-9F32-4784-8972-814F86C0239D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.DataProtectionManagement.Application", "modules\data-protection\LINGYUN.Abp.DataProtectionManagement.Application\LINGYUN.Abp.DataProtectionManagement.Application.csproj", "{A4ECDDC4-1115-48A2-AC74-3B75B58F8FFB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore", "modules\data-protection\LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore\LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore.csproj", "{AF15C829-9288-4D7F-95A0-4EA8DF909929}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.DataProtectionManagement.HttpApi", "modules\data-protection\LINGYUN.Abp.DataProtectionManagement.HttpApi\LINGYUN.Abp.DataProtectionManagement.HttpApi.csproj", "{616652A5-A420-475C-AC9F-FC687E3C768B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "demo", "demo", "{E29EC2A4-A2DE-442F-8616-DAFD69F128B8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Demo.Domain.Shared", "modules\demo\LINGYUN.Abp.Demo.Domain.Shared\LINGYUN.Abp.Demo.Domain.Shared.csproj", "{D736C433-C230-46B7-9D43-17D0282EBBDF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Demo.Domain", "modules\demo\LINGYUN.Abp.Demo.Domain\LINGYUN.Abp.Demo.Domain.csproj", "{FA525A71-C0BF-49FB-BAB7-547944618587}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Demo.Application.Contracts", "modules\demo\LINGYUN.Abp.Demo.Application.Contracts\LINGYUN.Abp.Demo.Application.Contracts.csproj", "{532D5703-0090-4F2E-B725-5786D53506C9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Demo.Application", "modules\demo\LINGYUN.Abp.Demo.Application\LINGYUN.Abp.Demo.Application.csproj", "{E538580B-A21F-4B3B-9CB4-741FE8C1C6EF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Demo.EntityFrameworkCore", "modules\demo\LINGYUN.Abp.Demo.EntityFrameworkCore\LINGYUN.Abp.Demo.EntityFrameworkCore.csproj", "{71CF0E82-FA07-472A-B32A-AC25EDA82BB0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Demo.HttpApi", "modules\demo\LINGYUN.Abp.Demo.HttpApi\LINGYUN.Abp.Demo.HttpApi.csproj", "{77965572-373C-4319-9EF9-73D6E660044B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "exporter", "exporter", "{4A2CF141-F32D-45A0-8665-B3705667A6D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Exporter.Application.Contracts", "framework\exporter\LINGYUN.Abp.Exporter.Application.Contracts\LINGYUN.Abp.Exporter.Application.Contracts.csproj", "{A3924A79-1ADC-458D-8764-3958297BDEB0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Exporter.Application", "framework\exporter\LINGYUN.Abp.Exporter.Application\LINGYUN.Abp.Exporter.Application.csproj", "{38A933EB-82F1-42A6-ABF3-F55975B4078E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Exporter.Core", "framework\exporter\LINGYUN.Abp.Exporter.Core\LINGYUN.Abp.Exporter.Core.csproj", "{03C9FFB2-E9A3-4CCC-A6B1-8B248BFBCB65}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Exporter.MiniExcel", "framework\exporter\LINGYUN.Abp.Exporter.MiniExcel\LINGYUN.Abp.Exporter.MiniExcel.csproj", "{CBC64BD6-297B-48F6-A3BA-0DBB4B0F5A69}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Exporter.MagicodesIE.Excel", "framework\exporter\LINGYUN.Abp.Exporter.MagicodesIE.Excel\LINGYUN.Abp.Exporter.MagicodesIE.Excel.csproj", "{319428B9-CE7F-4027-92FA-6311C4CE95FB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -1445,6 +1495,86 @@ Global
{C5D64A2B-7E7E-4509-9F31-425D59712E6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5D64A2B-7E7E-4509-9F31-425D59712E6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5D64A2B-7E7E-4509-9F31-425D59712E6F}.Release|Any CPU.Build.0 = Release|Any CPU
{A52C54FB-C96D-4032-8588-AFC2CD158D23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A52C54FB-C96D-4032-8588-AFC2CD158D23}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A52C54FB-C96D-4032-8588-AFC2CD158D23}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A52C54FB-C96D-4032-8588-AFC2CD158D23}.Release|Any CPU.Build.0 = Release|Any CPU
{B05ED61E-9A36-4E90-B876-F48559E018A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B05ED61E-9A36-4E90-B876-F48559E018A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B05ED61E-9A36-4E90-B876-F48559E018A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B05ED61E-9A36-4E90-B876-F48559E018A6}.Release|Any CPU.Build.0 = Release|Any CPU
{1E8DE890-F27F-4A1A-B356-0B6B9D3B1EF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E8DE890-F27F-4A1A-B356-0B6B9D3B1EF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E8DE890-F27F-4A1A-B356-0B6B9D3B1EF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E8DE890-F27F-4A1A-B356-0B6B9D3B1EF7}.Release|Any CPU.Build.0 = Release|Any CPU
{9D2C789C-8241-4F53-AFEF-F2AB15BAA823}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D2C789C-8241-4F53-AFEF-F2AB15BAA823}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D2C789C-8241-4F53-AFEF-F2AB15BAA823}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D2C789C-8241-4F53-AFEF-F2AB15BAA823}.Release|Any CPU.Build.0 = Release|Any CPU
{36AEA095-E34D-43F5-8000-9FA3A696C312}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36AEA095-E34D-43F5-8000-9FA3A696C312}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36AEA095-E34D-43F5-8000-9FA3A696C312}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36AEA095-E34D-43F5-8000-9FA3A696C312}.Release|Any CPU.Build.0 = Release|Any CPU
{2D5A9AB0-9F32-4784-8972-814F86C0239D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2D5A9AB0-9F32-4784-8972-814F86C0239D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2D5A9AB0-9F32-4784-8972-814F86C0239D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2D5A9AB0-9F32-4784-8972-814F86C0239D}.Release|Any CPU.Build.0 = Release|Any CPU
{A4ECDDC4-1115-48A2-AC74-3B75B58F8FFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A4ECDDC4-1115-48A2-AC74-3B75B58F8FFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A4ECDDC4-1115-48A2-AC74-3B75B58F8FFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A4ECDDC4-1115-48A2-AC74-3B75B58F8FFB}.Release|Any CPU.Build.0 = Release|Any CPU
{AF15C829-9288-4D7F-95A0-4EA8DF909929}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AF15C829-9288-4D7F-95A0-4EA8DF909929}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF15C829-9288-4D7F-95A0-4EA8DF909929}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF15C829-9288-4D7F-95A0-4EA8DF909929}.Release|Any CPU.Build.0 = Release|Any CPU
{616652A5-A420-475C-AC9F-FC687E3C768B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{616652A5-A420-475C-AC9F-FC687E3C768B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{616652A5-A420-475C-AC9F-FC687E3C768B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{616652A5-A420-475C-AC9F-FC687E3C768B}.Release|Any CPU.Build.0 = Release|Any CPU
{D736C433-C230-46B7-9D43-17D0282EBBDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D736C433-C230-46B7-9D43-17D0282EBBDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D736C433-C230-46B7-9D43-17D0282EBBDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D736C433-C230-46B7-9D43-17D0282EBBDF}.Release|Any CPU.Build.0 = Release|Any CPU
{FA525A71-C0BF-49FB-BAB7-547944618587}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FA525A71-C0BF-49FB-BAB7-547944618587}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FA525A71-C0BF-49FB-BAB7-547944618587}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FA525A71-C0BF-49FB-BAB7-547944618587}.Release|Any CPU.Build.0 = Release|Any CPU
{532D5703-0090-4F2E-B725-5786D53506C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{532D5703-0090-4F2E-B725-5786D53506C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{532D5703-0090-4F2E-B725-5786D53506C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{532D5703-0090-4F2E-B725-5786D53506C9}.Release|Any CPU.Build.0 = Release|Any CPU
{E538580B-A21F-4B3B-9CB4-741FE8C1C6EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E538580B-A21F-4B3B-9CB4-741FE8C1C6EF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E538580B-A21F-4B3B-9CB4-741FE8C1C6EF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E538580B-A21F-4B3B-9CB4-741FE8C1C6EF}.Release|Any CPU.Build.0 = Release|Any CPU
{71CF0E82-FA07-472A-B32A-AC25EDA82BB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71CF0E82-FA07-472A-B32A-AC25EDA82BB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71CF0E82-FA07-472A-B32A-AC25EDA82BB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{71CF0E82-FA07-472A-B32A-AC25EDA82BB0}.Release|Any CPU.Build.0 = Release|Any CPU
{77965572-373C-4319-9EF9-73D6E660044B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{77965572-373C-4319-9EF9-73D6E660044B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{77965572-373C-4319-9EF9-73D6E660044B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{77965572-373C-4319-9EF9-73D6E660044B}.Release|Any CPU.Build.0 = Release|Any CPU
{A3924A79-1ADC-458D-8764-3958297BDEB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A3924A79-1ADC-458D-8764-3958297BDEB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A3924A79-1ADC-458D-8764-3958297BDEB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3924A79-1ADC-458D-8764-3958297BDEB0}.Release|Any CPU.Build.0 = Release|Any CPU
{38A933EB-82F1-42A6-ABF3-F55975B4078E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{38A933EB-82F1-42A6-ABF3-F55975B4078E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{38A933EB-82F1-42A6-ABF3-F55975B4078E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{38A933EB-82F1-42A6-ABF3-F55975B4078E}.Release|Any CPU.Build.0 = Release|Any CPU
{03C9FFB2-E9A3-4CCC-A6B1-8B248BFBCB65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03C9FFB2-E9A3-4CCC-A6B1-8B248BFBCB65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03C9FFB2-E9A3-4CCC-A6B1-8B248BFBCB65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03C9FFB2-E9A3-4CCC-A6B1-8B248BFBCB65}.Release|Any CPU.Build.0 = Release|Any CPU
{CBC64BD6-297B-48F6-A3BA-0DBB4B0F5A69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CBC64BD6-297B-48F6-A3BA-0DBB4B0F5A69}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CBC64BD6-297B-48F6-A3BA-0DBB4B0F5A69}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CBC64BD6-297B-48F6-A3BA-0DBB4B0F5A69}.Release|Any CPU.Build.0 = Release|Any CPU
{319428B9-CE7F-4027-92FA-6311C4CE95FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{319428B9-CE7F-4027-92FA-6311C4CE95FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{319428B9-CE7F-4027-92FA-6311C4CE95FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{319428B9-CE7F-4027-92FA-6311C4CE95FB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -1712,6 +1842,30 @@ Global
{A7417E7F-DB97-48DB-B849-AFC15854A6E7} = {37E2CAFE-0024-452E-BF81-E15F937E08EF}
{8DDE4291-BC57-4C56-9871-B982462F4C3D} = {37E2CAFE-0024-452E-BF81-E15F937E08EF}
{C5D64A2B-7E7E-4509-9F31-425D59712E6F} = {37E2CAFE-0024-452E-BF81-E15F937E08EF}
{07C2FB08-985C-42FE-85AF-38E40A301668} = {99B7CBDE-A251-4738-97F0-DB1DB484BEE1}
{A52C54FB-C96D-4032-8588-AFC2CD158D23} = {07C2FB08-985C-42FE-85AF-38E40A301668}
{B05ED61E-9A36-4E90-B876-F48559E018A6} = {07C2FB08-985C-42FE-85AF-38E40A301668}
{1E8DE890-F27F-4A1A-B356-0B6B9D3B1EF7} = {07C2FB08-985C-42FE-85AF-38E40A301668}
{4FCD7337-4320-412D-9BC8-A0B243BC27B3} = {0B58AA48-665A-443F-A6A8-751FB9629DAF}
{9D2C789C-8241-4F53-AFEF-F2AB15BAA823} = {4FCD7337-4320-412D-9BC8-A0B243BC27B3}
{36AEA095-E34D-43F5-8000-9FA3A696C312} = {4FCD7337-4320-412D-9BC8-A0B243BC27B3}
{2D5A9AB0-9F32-4784-8972-814F86C0239D} = {4FCD7337-4320-412D-9BC8-A0B243BC27B3}
{A4ECDDC4-1115-48A2-AC74-3B75B58F8FFB} = {4FCD7337-4320-412D-9BC8-A0B243BC27B3}
{AF15C829-9288-4D7F-95A0-4EA8DF909929} = {4FCD7337-4320-412D-9BC8-A0B243BC27B3}
{616652A5-A420-475C-AC9F-FC687E3C768B} = {4FCD7337-4320-412D-9BC8-A0B243BC27B3}
{E29EC2A4-A2DE-442F-8616-DAFD69F128B8} = {0B58AA48-665A-443F-A6A8-751FB9629DAF}
{D736C433-C230-46B7-9D43-17D0282EBBDF} = {E29EC2A4-A2DE-442F-8616-DAFD69F128B8}
{FA525A71-C0BF-49FB-BAB7-547944618587} = {E29EC2A4-A2DE-442F-8616-DAFD69F128B8}
{532D5703-0090-4F2E-B725-5786D53506C9} = {E29EC2A4-A2DE-442F-8616-DAFD69F128B8}
{E538580B-A21F-4B3B-9CB4-741FE8C1C6EF} = {E29EC2A4-A2DE-442F-8616-DAFD69F128B8}
{71CF0E82-FA07-472A-B32A-AC25EDA82BB0} = {E29EC2A4-A2DE-442F-8616-DAFD69F128B8}
{77965572-373C-4319-9EF9-73D6E660044B} = {E29EC2A4-A2DE-442F-8616-DAFD69F128B8}
{4A2CF141-F32D-45A0-8665-B3705667A6D2} = {99B7CBDE-A251-4738-97F0-DB1DB484BEE1}
{A3924A79-1ADC-458D-8764-3958297BDEB0} = {4A2CF141-F32D-45A0-8665-B3705667A6D2}
{38A933EB-82F1-42A6-ABF3-F55975B4078E} = {4A2CF141-F32D-45A0-8665-B3705667A6D2}
{03C9FFB2-E9A3-4CCC-A6B1-8B248BFBCB65} = {4A2CF141-F32D-45A0-8665-B3705667A6D2}
{CBC64BD6-297B-48F6-A3BA-0DBB4B0F5A69} = {4A2CF141-F32D-45A0-8665-B3705667A6D2}
{319428B9-CE7F-4027-92FA-6311C4CE95FB} = {4A2CF141-F32D-45A0-8665-B3705667A6D2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {711A43C0-A2F8-4E5C-9B9F-F2551E4B3FF1}

3
aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/appsettings.Development.json

@ -52,7 +52,8 @@
"TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None",
"Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None",
"Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None",
"MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
"MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None",
"Demo": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None"
},
"DistributedLock": {
"IsEnabled": true,

3
aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/appsettings.json

@ -16,7 +16,8 @@
"TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None",
"Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None",
"Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None",
"MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
"MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None",
"Demo": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None"
},
"StringEncryption": {
"DefaultPassPhrase": "s46c5q55nxpeS8Ra",

1
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/LY.MicroService.Applications.Single.EntityFrameworkCore.csproj

@ -25,6 +25,7 @@
<ProjectReference Include="..\..\framework\auditing\LINGYUN.Abp.AuditLogging.EntityFrameworkCore\LINGYUN.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\framework\wechat\LINGYUN.Abp.WeChat\LINGYUN.Abp.WeChat.csproj" />
<ProjectReference Include="..\..\framework\common\LINGYUN.Abp.Data.DbMigrator\LINGYUN.Abp.Data.DbMigrator.csproj" />
<ProjectReference Include="..\..\modules\demo\LINGYUN.Abp.Demo.EntityFrameworkCore\LINGYUN.Abp.Demo.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>

5539
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240929080118_Add-Demo-Module.Designer.cs

File diff suppressed because it is too large

95
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/20240929080118_Add-Demo-Module.cs

@ -0,0 +1,95 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
{
/// <inheritdoc />
public partial class AddDemoModule : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Demo_Authors",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
BirthDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
ShortBio = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Demo_Authors", x => x.Id);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Demo_Books",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "varchar(128)", maxLength: 128, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Type = table.Column<int>(type: "int", nullable: false),
PublishDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Price = table.Column<float>(type: "float", nullable: false),
AuthorId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ExtraProperties = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_Demo_Books", x => x.Id);
table.ForeignKey(
name: "FK_Demo_Books_Demo_Authors_AuthorId",
column: x => x.AuthorId,
principalTable: "Demo_Authors",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_Demo_Authors_Name",
table: "Demo_Authors",
column: "Name");
migrationBuilder.CreateIndex(
name: "IX_Demo_Books_AuthorId",
table: "Demo_Books",
column: "AuthorId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Demo_Books");
migrationBuilder.DropTable(
name: "Demo_Authors");
}
}
}

133
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/Migrations/SingleMigrationsDbContextModelSnapshot.cs

@ -24,6 +24,130 @@ namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
modelBuilder.Entity("LINGYUN.Abp.Demo.Authors.Author", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<DateTime>("BirthDate")
.HasColumnType("datetime(6)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("char(36)")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime(6)")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("tinyint(1)")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("varchar(64)");
b.Property<string>("ShortBio")
.HasColumnType("longtext");
b.HasKey("Id");
b.HasIndex("Name");
b.ToTable("Demo_Authors", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.Demo.Books.Book", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<Guid>("AuthorId")
.HasColumnType("char(36)");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(40)
.HasColumnType("varchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime(6)")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("char(36)")
.HasColumnName("CreatorId");
b.Property<string>("ExtraProperties")
.IsRequired()
.HasColumnType("longtext")
.HasColumnName("ExtraProperties");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime(6)")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("char(36)")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("varchar(128)");
b.Property<float>("Price")
.HasColumnType("float");
b.Property<DateTime>("PublishDate")
.HasColumnType("datetime(6)");
b.Property<int>("Type")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("AuthorId");
b.ToTable("Demo_Books", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.LocalizationManagement.Language", b =>
{
b.Property<Guid>("Id")
@ -4967,6 +5091,15 @@ namespace LY.MicroService.Applications.Single.EntityFrameworkCore.Migrations
b.ToTable("AbpSettingDefinitions", (string)null);
});
modelBuilder.Entity("LINGYUN.Abp.Demo.Books.Book", b =>
{
b.HasOne("LINGYUN.Abp.Demo.Authors.Author", null)
.WithMany()
.HasForeignKey("AuthorId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("LINGYUN.Abp.Saas.Tenants.Tenant", b =>
{
b.HasOne("LINGYUN.Abp.Saas.Editions.Edition", "Edition")

5
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/SingleMigrationsDbContext.cs

@ -1,4 +1,5 @@
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
using LINGYUN.Abp.Demo.EntityFrameworkCore;
using LINGYUN.Abp.LocalizationManagement.EntityFrameworkCore;
using LINGYUN.Abp.MessageService.EntityFrameworkCore;
using LINGYUN.Abp.Notifications.EntityFrameworkCore;
using LINGYUN.Abp.Saas.EntityFrameworkCore;
@ -48,5 +49,7 @@ public class SingleMigrationsDbContext : AbpDbContext<SingleMigrationsDbContext>
modelBuilder.ConfigureNotifications();
modelBuilder.ConfigureNotificationsDefinition();
modelBuilder.ConfigureMessageService();
modelBuilder.ConfigureDemo();
}
}

3
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/FodyWeavers.xml

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

30
aspnet-core/modules/demo/LINGYUN.Abp.Demo.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/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN.Abp.Demo.Application.Contracts.csproj

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Authorization.Abstractions" />
<PackageReference Include="Volo.Abp.Ddd.Application.Contracts" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\framework\exporter\LINGYUN.Abp.Exporter.Application.Contracts\LINGYUN.Abp.Exporter.Application.Contracts.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.Demo.Domain.Shared\LINGYUN.Abp.Demo.Domain.Shared.csproj" />
</ItemGroup>
</Project>

15
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/AbpDemoApplicationContractsModule.cs

@ -0,0 +1,15 @@
using LINGYUN.Abp.Exporter;
using Volo.Abp.Application;
using Volo.Abp.Authorization;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Demo;
[DependsOn(
typeof(AbpExporterApplicationContractsModule),
typeof(AbpAuthorizationAbstractionsModule),
typeof(AbpDddApplicationContractsModule),
typeof(AbpDemoDomainSharedModule))]
public class AbpDemoApplicationContractsModule : AbpModule
{
}

12
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Authors/AuthorDto.cs

@ -0,0 +1,12 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.Demo.Authors;
public class AuthorDto : EntityDto<Guid>
{
public string Name { get; set; }
public DateTime BirthDate { get; set; }
public string? ShortBio { get; set; }
}

15
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Authors/CreateAuthorDto.cs

@ -0,0 +1,15 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.Abp.Demo.Authors;
public class CreateAuthorDto
{
[Required]
[StringLength(AuthorConsts.MaxNameLength)]
public string Name { get; set; }
[Required]
public DateTime BirthDate { get; set; }
public string? ShortBio { get; set; }
}

7
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Authors/GetAuthorListDto.cs

@ -0,0 +1,7 @@
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.Demo.Authors;
public class GetAuthorListDto : PagedAndSortedResultRequestDto
{
public string? Filter { get; set; }
}

18
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Authors/IAuthorAppService.cs

@ -0,0 +1,18 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.Demo.Authors;
public interface IAuthorAppService : IApplicationService
{
Task<AuthorDto> GetAsync(Guid id);
Task<PagedResultDto<AuthorDto>> GetListAsync(GetAuthorListDto input);
Task<AuthorDto> CreateAsync(CreateAuthorDto input);
Task UpdateAsync(Guid id, UpdateAuthorDto input);
Task DeleteAsync(Guid id);
}

15
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Authors/UpdateAuthorDto.cs

@ -0,0 +1,15 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.Abp.Demo.Authors;
public class UpdateAuthorDto
{
[Required]
[StringLength(AuthorConsts.MaxNameLength)]
public string Name { get; set; }
[Required]
public DateTime BirthDate { get; set; }
public string ShortBio { get; set; }
}

8
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/AuthorLookupDto.cs

@ -0,0 +1,8 @@
using System;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.Demo.Books;
public class AuthorLookupDto : EntityDto<Guid>
{
public string Name { get; set; }
}

24
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/BookDto.cs

@ -0,0 +1,24 @@
using System;
using System.ComponentModel;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.Demo.Books;
public class BookDto : AuditedEntityDto<Guid>
{
[DisplayName("名称")]
public string Name { get; set; }
[DisplayName("类型")]
public BookType Type { get; set; }
[DisplayName("出版日期")]
public DateTime PublishDate { get; set; }
[DisplayName("价格")]
public float Price { get; set; }
public Guid AuthorId { get; set; }
[DisplayName("作者")]
public string AuthorName { get; set; }
}

11
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/BookExportListInput.cs

@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.Demo.Books;
public class BookExportListInput : LimitedResultRequestDto, ISortedResultRequest
{
[Required]
public string FileName { get; set; }
public string? Filterr { get; set; }
public string? Sorting { get; set; }
}

30
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/BookImportDto.cs

@ -0,0 +1,30 @@
using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.Abp.Demo.Books;
public class BookImportDto
{
[Required]
[StringLength(128)]
[DisplayName("名称")]
public string Name { get; set; }
[Required]
[DisplayName("类型")]
public BookType Type { get; set; } = BookType.Undefined;
[Required]
[DataType(DataType.Date)]
[DisplayName("出版日期")]
public DateTime PublishDate { get; set; } = DateTime.Now;
[Required]
[DisplayName("价格")]
public float Price { get; set; }
public Guid AuthorId { get; set; }
[DisplayName("作者")]
public string AuthorName { get; set; }
}

9
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/BookImportInput.cs

@ -0,0 +1,9 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Content;
namespace LINGYUN.Abp.Demo.Books;
public class BookImportInput
{
[Required]
public IRemoteStreamContent Content { get; set; }
}

22
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/CreateUpdateBookDto.cs

@ -0,0 +1,22 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.Abp.Demo.Books;
public class CreateUpdateBookDto
{
[Required]
[StringLength(128)]
public string Name { get; set; }
[Required]
public BookType Type { get; set; } = BookType.Undefined;
[Required]
[DataType(DataType.Date)]
public DateTime PublishDate { get; set; } = DateTime.Now;
[Required]
public float Price { get; set; }
public Guid AuthorId { get; set; }
}

18
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Books/IBookAppService.cs

@ -0,0 +1,18 @@
using LINGYUN.Abp.Exporter;
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.Demo.Books;
public interface IBookAppService :
ICrudAppService< //Defines CRUD methods
BookDto, //Used to show books
Guid, //Primary key of the book entity
PagedAndSortedResultRequestDto, //Used for paging/sorting
CreateUpdateBookDto>, //Used to create/update a book
IExporterAppService<BookDto, BookExportListInput>,
IImporterAppService<BookImportInput>
{
Task<ListResultDto<AuthorLookupDto>> GetAuthorLookupAsync();
}

6
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/DemoRemoteServiceConsts.cs

@ -0,0 +1,6 @@
namespace LINGYUN.Abp.Demo;
public static class DemoRemoteServiceConsts
{
public const string RemoteServiceName = "Demo";
public const string ModuleName = "demo";
}

34
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Permissions/DemoPermissionDefinitionProvider.cs

@ -0,0 +1,34 @@
using LINGYUN.Abp.Demo.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
namespace LINGYUN.Abp.Demo.Permissions;
public class DemoPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var demoGroup = context.AddGroup(DemoPermissions.GroupName, L("Permission:Demo"));
var booksPermission = demoGroup.AddPermission(DemoPermissions.Books.Default, L("Permission:Books"));
booksPermission.AddChild(DemoPermissions.Books.Create, L("Permission:Books.Create"));
booksPermission.AddChild(DemoPermissions.Books.Edit, L("Permission:Books.Edit"));
booksPermission.AddChild(DemoPermissions.Books.Delete, L("Permission:Books.Delete"));
booksPermission.AddChild(DemoPermissions.Books.Export, L("Permission:Books.Export"));
booksPermission.AddChild(DemoPermissions.Books.Import, L("Permission:Books.Import"));
var authorsPermission = demoGroup.AddPermission(
DemoPermissions.Authors.Default, L("Permission:Authors"));
authorsPermission.AddChild(
DemoPermissions.Authors.Create, L("Permission:Authors.Create"));
authorsPermission.AddChild(
DemoPermissions.Authors.Edit, L("Permission:Authors.Edit"));
authorsPermission.AddChild(
DemoPermissions.Authors.Delete, L("Permission:Authors.Delete"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<DemoResource>(name);
}
}

25
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application.Contracts/LINGYUN/Abp/Demo/Permissions/DemoPermissions.cs

@ -0,0 +1,25 @@
namespace LINGYUN.Abp.Demo.Permissions;
public static class DemoPermissions
{
public const string GroupName = "Demo";
public static class Books
{
public const string Default = GroupName + ".Books";
public const string Create = Default + ".Create";
public const string Edit = Default + ".Edit";
public const string Delete = Default + ".Delete";
public const string Export = Default + ".Export";
public const string Import = Default + ".Import";
}
// *** ADDED a NEW NESTED CLASS ***
public static class Authors
{
public const string Default = GroupName + ".Authors";
public const string Create = Default + ".Create";
public const string Edit = Default + ".Edit";
public const string Delete = Default + ".Delete";
}
}

3
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/FodyWeavers.xml

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

30
aspnet-core/modules/demo/LINGYUN.Abp.Demo.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>

28
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN.Abp.Demo.Application.csproj

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IsPackable>false</IsPackable>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Application" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\framework\exporter\LINGYUN.Abp.Exporter.Application\LINGYUN.Abp.Exporter.Application.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.Demo.Application.Contracts\LINGYUN.Abp.Demo.Application.Contracts.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.Demo.Domain\LINGYUN.Abp.Demo.Domain.csproj" />
</ItemGroup>
</Project>

25
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/AbpDemoApplicationModule.cs

@ -0,0 +1,25 @@
using LINGYUN.Abp.Exporter;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Demo;
[DependsOn(
typeof(AbpDddApplicationModule),
typeof(AbpDemoDomainModule),
typeof(AbpExporterApplicationModule),
typeof(AbpDemoApplicationContractsModule))]
public class AbpDemoApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpDemoApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<DemoApplicationMapperProfile>(validate: true);
});
}
}

89
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/Authors/AuthorAppService.cs

@ -0,0 +1,89 @@
using LINGYUN.Abp.Demo.Permissions;
using Microsoft.AspNetCore.Authorization;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Repositories;
namespace LINGYUN.Abp.Demo.Authors;
[Authorize(DemoPermissions.Authors.Default)]
public class AuthorAppService : DemoApplicationServiceBase, IAuthorAppService
{
private readonly IAuthorRepository _authorRepository;
private readonly AuthorManager _authorManager;
public AuthorAppService(
IAuthorRepository authorRepository,
AuthorManager authorManager)
{
_authorRepository = authorRepository;
_authorManager = authorManager;
}
public async Task<AuthorDto> GetAsync(Guid id)
{
var author = await _authorRepository.GetAsync(id);
return ObjectMapper.Map<Author, AuthorDto>(author);
}
public async Task<PagedResultDto<AuthorDto>> GetListAsync(GetAuthorListDto input)
{
if (input.Sorting.IsNullOrWhiteSpace())
{
input.Sorting = nameof(Author.Name);
}
var authors = await _authorRepository.GetListAsync(
input.SkipCount,
input.MaxResultCount,
input.Sorting,
input.Filter
);
var totalCount = input.Filter == null
? await _authorRepository.CountAsync()
: await _authorRepository.CountAsync(
author => author.Name.Contains(input.Filter));
return new PagedResultDto<AuthorDto>(
totalCount,
ObjectMapper.Map<List<Author>, List<AuthorDto>>(authors)
);
}
[Authorize(DemoPermissions.Authors.Create)]
public async Task<AuthorDto> CreateAsync(CreateAuthorDto input)
{
var author = await _authorManager.CreateAsync(
input.Name,
input.BirthDate,
input.ShortBio
);
await _authorRepository.InsertAsync(author);
return ObjectMapper.Map<Author, AuthorDto>(author);
}
[Authorize(DemoPermissions.Authors.Edit)]
public async Task UpdateAsync(Guid id, UpdateAuthorDto input)
{
var author = await _authorRepository.GetAsync(id);
if (author.Name != input.Name)
{
await _authorManager.ChangeNameAsync(author, input.Name);
}
author.BirthDate = input.BirthDate;
author.ShortBio = input.ShortBio;
await _authorRepository.UpdateAsync(author);
}
[Authorize(DemoPermissions.Authors.Delete)]
public async Task DeleteAsync(Guid id)
{
await _authorRepository.DeleteAsync(id);
}
}

206
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/Books/BookAppService.cs

@ -0,0 +1,206 @@
using LINGYUN.Abp.Demo.Authors;
using LINGYUN.Abp.Demo.Permissions;
using LINGYUN.Abp.Exporter;
using Microsoft.AspNetCore.Authorization;
using System.Linq.Dynamic.Core;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Content;
using Volo.Abp.Domain.Entities;
namespace LINGYUN.Abp.Demo.Books;
[Authorize(DemoPermissions.Books.Default)]
public class BookAppService :
CrudAppService<
Book, //The Book entity
BookDto, //Used to show books
Guid, //Primary key of the book entity
PagedAndSortedResultRequestDto, //Used for paging/sorting
CreateUpdateBookDto>, //Used to create/update a book
IBookAppService //implement the IBookAppService
{
private readonly IAuthorRepository _authorRepository;
private readonly AuthorManager _authorManager;
private readonly IExporterProvider _exporterProvider;
private readonly IImporterProvider _importerProvider;
public BookAppService(
IExporterProvider exporterProvider,
IImporterProvider importerProvider,
IBookRepository bookRepository,
AuthorManager authorManager,
IAuthorRepository authorRepository)
: base(bookRepository)
{
_exporterProvider = exporterProvider;
_importerProvider = importerProvider;
_authorManager = authorManager;
_authorRepository = authorRepository;
GetPolicyName = DemoPermissions.Books.Default;
GetListPolicyName = DemoPermissions.Books.Default;
CreatePolicyName = DemoPermissions.Books.Create;
UpdatePolicyName = DemoPermissions.Books.Edit;
DeletePolicyName = DemoPermissions.Books.Delete;
}
public async virtual Task ImportAsync(BookImportInput input)
{
await CheckCreatePolicyAsync();
await CheckPolicyAsync(DemoPermissions.Books.Import);
var stream = input.Content.GetStream();
var createAuthors = new List<Author>();
var existsAuthors = new List<Author>();
var createManyDtos = await _importerProvider.ImportAsync<BookImportDto>(stream);
foreach (var book in createManyDtos)
{
var author = existsAuthors.Find(x => x.Name == book.AuthorName) ??
await _authorRepository.FindByNameAsync(book.AuthorName);
if (author == null)
{
author = await _authorManager.CreateAsync(book.AuthorName, Clock.Now);
createAuthors.Add(author);
}
if (!existsAuthors.Any(x => x.Name == author.Name))
{
existsAuthors.Add(author);
}
book.AuthorId = author.Id;
}
var createManyBooks = createManyDtos.Select(dto =>
{
var book = ObjectMapper.Map<BookImportDto, Book>(dto);
TryToSetTenantId(book);
return book;
});
if (createAuthors.Count > 0)
{
await _authorRepository.InsertManyAsync(createAuthors, autoSave: true);
}
await Repository.InsertManyAsync(createManyBooks, autoSave: true);
}
public async virtual Task<IRemoteStreamContent> ExportAsync(BookExportListInput input)
{
await CheckPolicyAsync(DemoPermissions.Books.Export);
var bookSet = await Repository.GetQueryableAsync();
var authorSet = await _authorRepository.GetQueryableAsync();
var query = from book in bookSet
join author in authorSet on book.AuthorId equals author.Id
select new { book, author };
query = query
.OrderBy(NormalizeSorting(input.Sorting))
.Take(input.MaxResultCount);
var queryResult = await AsyncExecuter.ToListAsync(query);
var bookDtos = queryResult.Select(x =>
{
var bookDto = ObjectMapper.Map<Book, BookDto>(x.book);
bookDto.AuthorName = x.author.Name;
return bookDto;
}).ToList();
var stream = await _exporterProvider.ExportAsync(bookDtos);
return new RemoteStreamContent(stream, input.FileName);
}
public override async Task<BookDto> GetAsync(Guid id)
{
//Get the IQueryable<Book> from the repository
var queryable = await Repository.GetQueryableAsync();
//Prepare a query to join books and authors
var query = from book in queryable
join author in await _authorRepository.GetQueryableAsync() on book.AuthorId equals author.Id
where book.Id == id
select new { book, author };
//Execute the query and get the book with author
var queryResult = await AsyncExecuter.FirstOrDefaultAsync(query);
if (queryResult == null)
{
throw new EntityNotFoundException(typeof(Book), id);
}
var bookDto = ObjectMapper.Map<Book, BookDto>(queryResult.book);
bookDto.AuthorName = queryResult.author.Name;
return bookDto;
}
public override async Task<PagedResultDto<BookDto>> GetListAsync(PagedAndSortedResultRequestDto input)
{
//Get the IQueryable<Book> from the repository
var queryable = await Repository.GetQueryableAsync();
//Prepare a query to join books and authors
var query = from book in queryable
join author in await _authorRepository.GetQueryableAsync() on book.AuthorId equals author.Id
select new { book, author };
//Paging
query = query
.OrderBy(NormalizeSorting(input.Sorting))
.Skip(input.SkipCount)
.Take(input.MaxResultCount);
//Execute the query and get a list
var queryResult = await AsyncExecuter.ToListAsync(query);
//Convert the query result to a list of BookDto objects
var bookDtos = queryResult.Select(x =>
{
var bookDto = ObjectMapper.Map<Book, BookDto>(x.book);
bookDto.AuthorName = x.author.Name;
return bookDto;
}).ToList();
//Get the total count with another query
var totalCount = await Repository.GetCountAsync();
return new PagedResultDto<BookDto>(
totalCount,
bookDtos
);
}
public async Task<ListResultDto<AuthorLookupDto>> GetAuthorLookupAsync()
{
var authors = await _authorRepository.GetListAsync();
return new ListResultDto<AuthorLookupDto>(
ObjectMapper.Map<List<Author>, List<AuthorLookupDto>>(authors)
);
}
private static string NormalizeSorting(string? sorting)
{
if (sorting.IsNullOrEmpty())
{
return $"book.{nameof(Book.Name)}";
}
if (sorting.Contains("authorName", StringComparison.OrdinalIgnoreCase))
{
return sorting.Replace(
"authorName",
"author.Name",
StringComparison.OrdinalIgnoreCase
);
}
return $"book.{sorting}";
}
}

26
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/DemoApplicationMapperProfile.cs

@ -0,0 +1,26 @@
using AutoMapper;
using LINGYUN.Abp.Demo.Authors;
using LINGYUN.Abp.Demo.Books;
using Volo.Abp.AutoMapper;
namespace LINGYUN.Abp.Demo;
public class DemoApplicationMapperProfile : Profile
{
public DemoApplicationMapperProfile()
{
CreateMap<Book, BookDto>()
.Ignore(dto => dto.AuthorName);
CreateMap<BookImportDto, Book>()
.IgnoreAuditedObjectProperties()
.Ignore(dto => dto.Id)
.Ignore(dto => dto.ExtraProperties)
.Ignore(dto => dto.ConcurrencyStamp);
CreateMap<CreateUpdateBookDto, Book>()
.IgnoreAuditedObjectProperties()
.Ignore(dto => dto.Id)
.Ignore(dto => dto.ExtraProperties)
.Ignore(dto => dto.ConcurrencyStamp);
CreateMap<Author, AuthorDto>();
CreateMap<Author, AuthorLookupDto>();
}
}

11
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/DemoApplicationServiceBase.cs

@ -0,0 +1,11 @@
using Volo.Abp.Application.Services;
namespace LINGYUN.Abp.Demo;
public abstract class DemoApplicationServiceBase : ApplicationService
{
protected DemoApplicationServiceBase()
{
LocalizationResource = typeof(AbpDemoApplicationModule);
ObjectMapperContext = typeof(AbpDemoApplicationModule);
}
}

3
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/FodyWeavers.xml

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

30
aspnet-core/modules/demo/LINGYUN.Abp.Demo.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/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN.Abp.Demo.Domain.Shared.csproj

@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IsPackable>false</IsPackable>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="LINGYUN\Abp\Demo\Localization\Resources\en.json" />
<None Remove="LINGYUN\Abp\Demo\Localization\Resources\zh-Hans.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LINGYUN\Abp\Demo\Localization\Resources\en.json" />
<EmbeddedResource Include="LINGYUN\Abp\Demo\Localization\Resources\zh-Hans.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain.Shared" />
</ItemGroup>
</Project>

31
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/AbpDemoDomainSharedModule.cs

@ -0,0 +1,31 @@
using LINGYUN.Abp.Demo.Localization;
using Volo.Abp.Domain;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.Abp.Demo;
[DependsOn(typeof(AbpDddDomainSharedModule))]
public class AbpDemoDomainSharedModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AbpDemoDomainSharedModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<DemoResource>("en")
.AddVirtualJson("/LINGYUN/Abp/Demo/Localization/Resources");
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace(DemoErrorCodes.Namespace, typeof(DemoResource));
});
}
}

5
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/Authors/AuthorConsts.cs

@ -0,0 +1,5 @@
namespace LINGYUN.Abp.Demo.Authors;
public static class AuthorConsts
{
public const int MaxNameLength = 64;
}

13
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/Books/BookType.cs

@ -0,0 +1,13 @@
namespace LINGYUN.Abp.Demo.Books;
public enum BookType
{
Undefined,
Adventure,
Biography,
Dystopia,
Fantastic,
Horror,
Science,
ScienceFiction,
Poetry
}

14
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/DemoErrorCodes.cs

@ -0,0 +1,14 @@
namespace LINGYUN.Abp.Demo;
public static class DemoErrorCodes
{
public const string Namespace = "Demo";
public static class Author
{
public const string Prefix = Namespace + ":00";
/// <summary>
/// 作者 {Name} 已经存在!
/// </summary>
public const string AuthorAlreadyExists = Prefix + "001";
}
}

8
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/Localization/DemoResource.cs

@ -0,0 +1,8 @@
using Volo.Abp.Localization;
namespace LINGYUN.Abp.Demo.Localization;
[LocalizationResourceName("Demo")]
public class DemoResource
{
}

16
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/Localization/Resources/en.json

@ -0,0 +1,16 @@
{
"culture": "en",
"texts": {
"Permission:Books": "Books",
"Permission:Books.Create": "Create Books",
"Permission:Books.Edit": "Edit Books",
"Permission:Books.Delete": "Delete Books",
"Permission:Books.Export": "Export Books",
"Permission:Books.Import": "Import Books",
"Permission:Authors": "Authors",
"Permission:Authors.Create": "Create Authors",
"Permission:Authors.Edit": "Edit Authors",
"Permission:Authors.Delete": "Delete Authors",
"Demo:00001": "Author {Name} already exists!"
}
}

16
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain.Shared/LINGYUN/Abp/Demo/Localization/Resources/zh-Hans.json

@ -0,0 +1,16 @@
{
"culture": "zh-Hans",
"texts": {
"Permission:Books": "书籍管理",
"Permission:Books.Create": "新增书籍",
"Permission:Books.Edit": "编辑书籍",
"Permission:Books.Delete": "删除书籍",
"Permission:Books.Export": "导出书籍",
"Permission:Books.Import": "导入书籍",
"Permission:Authors": "作者管理",
"Permission:Authors.Create": "新增作者",
"Permission:Authors.Edit": "编辑作者",
"Permission:Authors.Delete": "删除作者",
"Demo:00001": "作者 {Name} 已经存在!"
}
}

3
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/FodyWeavers.xml

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

30
aspnet-core/modules/demo/LINGYUN.Abp.Demo.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>

28
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN.Abp.Demo.Domain.csproj

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IsPackable>false</IsPackable>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Ddd.Domain" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\framework\data-protection\LINGYUN.Abp.DataProtection\LINGYUN.Abp.DataProtection.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.Demo.Domain.Shared\LINGYUN.Abp.Demo.Domain.Shared.csproj" />
</ItemGroup>
</Project>

37
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/AbpDemoDomainModule.cs

@ -0,0 +1,37 @@
using LINGYUN.Abp.DataProtection;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Demo;
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(AbpDddDomainModule),
typeof(AbpDataProtectionModule),
typeof(AbpDemoDomainSharedModule))]
public class AbpDemoDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpDemoDomainModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<DemoDomainMapperProfile>(validate: true);
});
//Configure<AbpLocalizationPersistenceOptions>(options =>
//{
// options.AddPersistenceResource<DemoResource>();
//});
// 分布式事件
//Configure<AbpDistributedEntityEventOptions>(options =>
//{
// options.AutoEventSelectors.Add<Text>();
// options.EtoMappings.Add<Text, TextEto>();
//});
}
}

43
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Authors/Author.cs

@ -0,0 +1,43 @@
using JetBrains.Annotations;
using Volo.Abp;
using Volo.Abp.Domain.Entities.Auditing;
namespace LINGYUN.Abp.Demo.Authors;
public class Author : FullAuditedAggregateRoot<Guid>
{
public string Name { get; private set; }
public DateTime BirthDate { get; set; }
public string? ShortBio { get; set; }
private Author()
{
/* This constructor is for deserialization / ORM purpose */
}
internal Author(
Guid id,
[NotNull] string name,
DateTime birthDate,
[CanBeNull] string? shortBio = null)
: base(id)
{
SetName(name);
BirthDate = birthDate;
ShortBio = shortBio;
}
internal Author ChangeName([NotNull] string name)
{
SetName(name);
return this;
}
private void SetName([NotNull] string name)
{
Name = Check.NotNullOrWhiteSpace(
name,
nameof(name),
maxLength: AuthorConsts.MaxNameLength
);
}
}

11
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Authors/AuthorAlreadyExistsException.cs

@ -0,0 +1,11 @@
using Volo.Abp;
namespace LINGYUN.Abp.Demo.Authors;
public class AuthorAlreadyExistsException : BusinessException
{
public AuthorAlreadyExistsException(string name)
: base(DemoErrorCodes.Author.AuthorAlreadyExists)
{
WithData("Name", name);
}
}

51
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Authors/AuthorManager.cs

@ -0,0 +1,51 @@
using JetBrains.Annotations;
using Volo.Abp;
using Volo.Abp.Domain.Services;
namespace LINGYUN.Abp.Demo.Authors;
public class AuthorManager : DomainService
{
private readonly IAuthorRepository _authorRepository;
public AuthorManager(IAuthorRepository authorRepository)
{
_authorRepository = authorRepository;
}
public async Task<Author> CreateAsync(
[NotNull] string name,
DateTime birthDate,
[CanBeNull] string? shortBio = null)
{
Check.NotNullOrWhiteSpace(name, nameof(name));
var existingAuthor = await _authorRepository.FindByNameAsync(name);
if (existingAuthor != null)
{
throw new AuthorAlreadyExistsException(name);
}
return new Author(
GuidGenerator.Create(),
name,
birthDate,
shortBio
);
}
public async Task ChangeNameAsync(
[NotNull] Author author,
[NotNull] string newName)
{
Check.NotNull(author, nameof(author));
Check.NotNullOrWhiteSpace(newName, nameof(newName));
var existingAuthor = await _authorRepository.FindByNameAsync(newName);
if (existingAuthor != null && existingAuthor.Id != author.Id)
{
throw new AuthorAlreadyExistsException(newName);
}
author.ChangeName(newName);
}
}

14
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Authors/IAuthorRepository.cs

@ -0,0 +1,14 @@
using Volo.Abp.Domain.Repositories;
namespace LINGYUN.Abp.Demo.Authors;
public interface IAuthorRepository : IRepository<Author, Guid>
{
Task<Author?> FindByNameAsync(string name);
Task<List<Author>> GetListAsync(
int skipCount,
int maxResultCount,
string sorting,
string? filter = null
);
}

16
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Books/Book.cs

@ -0,0 +1,16 @@
using LINGYUN.Abp.DataProtection;
using Volo.Abp.Domain.Entities.Auditing;
namespace LINGYUN.Abp.Demo.Books;
public class Book : AuditedAggregateRoot<Guid>, IDataProtected
{
public string Name { get; set; }
public BookType Type { get; set; }
public DateTime PublishDate { get; set; }
public float Price { get; set; }
public Guid AuthorId { get; set; }
}

6
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/Books/IBookRepository.cs

@ -0,0 +1,6 @@
using Volo.Abp.Domain.Repositories;
namespace LINGYUN.Abp.Demo.Books;
public interface IBookRepository : IRepository<Book, Guid>
{
}

10
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/DemoDbProterties.cs

@ -0,0 +1,10 @@
namespace LINGYUN.Abp.Demo;
public static class DemoDbProterties
{
public static string DbTablePrefix { get; set; } = "Demo_";
public static string? DbSchema { get; set; } = null;
public const string ConnectionStringName = "Demo";
}

10
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/DemoDomainMapperProfile.cs

@ -0,0 +1,10 @@
using AutoMapper;
namespace LINGYUN.Abp.Demo;
public class DemoDomainMapperProfile : Profile
{
public DemoDomainMapperProfile()
{
}
}

3
aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/FodyWeavers.xml

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

30
aspnet-core/modules/demo/LINGYUN.Abp.Demo.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>

23
aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN.Abp.Demo.EntityFrameworkCore.csproj

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IsPackable>false</IsPackable>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\framework\data-protection\LINGYUN.Abp.DataProtection.EntityFrameworkCore\LINGYUN.Abp.DataProtection.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\LINGYUN.Abp.Demo.Domain\LINGYUN.Abp.Demo.Domain.csproj" />
</ItemGroup>
</Project>

41
aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/Authors/EfCoreAuthorRepository.cs

@ -0,0 +1,41 @@
using LINGYUN.Abp.Demo.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System.Linq.Dynamic.Core;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.Abp.Demo.Authors;
public class EfCoreAuthorRepository
: EfCoreRepository<DemoDbContext, Author, Guid>,
IAuthorRepository
{
public EfCoreAuthorRepository(
IDbContextProvider<DemoDbContext> dbContextProvider)
: base(dbContextProvider)
{
}
public async Task<Author?> FindByNameAsync(string name)
{
var dbSet = await GetDbSetAsync();
return await dbSet.FirstOrDefaultAsync(author => author.Name == name);
}
public async Task<List<Author>> GetListAsync(
int skipCount,
int maxResultCount,
string sorting,
string? filter = null)
{
var dbSet = await GetDbSetAsync();
return await dbSet
.WhereIf(
!filter.IsNullOrWhiteSpace(),
author => author.Name.Contains(filter!)
)
.OrderBy(sorting)
.Skip(skipCount)
.Take(maxResultCount)
.ToListAsync();
}
}

17
aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/Books/EfCoreBookRepository.cs

@ -0,0 +1,17 @@
using JetBrains.Annotations;
using LINGYUN.Abp.DataProtection;
using LINGYUN.Abp.DataProtection.EntityFrameworkCore;
using LINGYUN.Abp.Demo.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.Abp.Demo.Books;
public class EfCoreBookRepository : EfCoreDataProtectionRepository<DemoDbContext, Book, Guid>, IBookRepository
{
public EfCoreBookRepository(
[NotNull] IDbContextProvider<DemoDbContext> dbContextProvider,
[NotNull] IDataAuthorizationService dataAuthorizationService,
[NotNull] IEntityTypeFilterBuilder entityTypeFilterBuilder)
: base(dbContextProvider, dataAuthorizationService, entityTypeFilterBuilder)
{
}
}

25
aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/EntityFrameworkCore/AbpDemoEntityFrameworkCoreModule.cs

@ -0,0 +1,25 @@
using LINGYUN.Abp.DataProtection.EntityFrameworkCore;
using LINGYUN.Abp.Demo.Authors;
using LINGYUN.Abp.Demo.Books;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Demo.EntityFrameworkCore;
[DependsOn(
typeof(AbpDemoDomainModule),
typeof(AbpDataProtectionEntityFrameworkCoreModule))]
public class AbpDemoEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<DemoDbContext>(options =>
{
//
options.AddRepository<Author, EfCoreAuthorRepository>();
options.AddRepository<Book, EfCoreBookRepository>();
options.AddDefaultRepositories();
});
}
}

24
aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/EntityFrameworkCore/DemoDbContext.cs

@ -0,0 +1,24 @@
using LINGYUN.Abp.DataProtection.EntityFrameworkCore;
using LINGYUN.Abp.Demo.Authors;
using LINGYUN.Abp.Demo.Books;
using Microsoft.EntityFrameworkCore;
namespace LINGYUN.Abp.Demo.EntityFrameworkCore;
public class DemoDbContext : AbpDataProtectionDbContext<DemoDbContext>
{
public DbSet<Book> Books { get; set; }
public DbSet<Author> Authors { get; set; }
public DemoDbContext(DbContextOptions<DemoDbContext> options) : base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.ConfigureDemo(); ;
}
}

45
aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/EntityFrameworkCore/DemoDbContextModelCreatingExtensions.cs

@ -0,0 +1,45 @@
using LINGYUN.Abp.Demo.Authors;
using LINGYUN.Abp.Demo.Books;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace LINGYUN.Abp.Demo.EntityFrameworkCore;
public static class DemoDbContextModelCreatingExtensions
{
public static void ConfigureDemo(
this ModelBuilder builder,
Action<DemoModelBuilderConfigurationOptions>? optionsAction = null)
{
Check.NotNull(builder, nameof(builder));
var options = new DemoModelBuilderConfigurationOptions(
DemoDbProterties.DbTablePrefix,
DemoDbProterties.DbSchema
);
optionsAction?.Invoke(options);
builder.Entity<Book>(b =>
{
b.ToTable(options.TablePrefix + "Books", options.Schema);
b.ConfigureByConvention(); //auto configure for the base class props
b.Property(x => x.Name).IsRequired().HasMaxLength(128);
// ADD THE MAPPING FOR THE RELATION
b.HasOne<Author>().WithMany().HasForeignKey(x => x.AuthorId).IsRequired();
});
builder.Entity<Author>(b =>
{
b.ToTable(options.TablePrefix + "Authors", options.Schema);
b.ConfigureByConvention();
b.Property(x => x.Name)
.IsRequired()
.HasMaxLength(AuthorConsts.MaxNameLength);
b.HasIndex(x => x.Name);
});
}
}

16
aspnet-core/modules/demo/LINGYUN.Abp.Demo.EntityFrameworkCore/LINGYUN/Abp/Demo/EntityFrameworkCore/DemoModelBuilderConfigurationOptions.cs

@ -0,0 +1,16 @@
using JetBrains.Annotations;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace LINGYUN.Abp.Demo.EntityFrameworkCore;
public class DemoModelBuilderConfigurationOptions : AbpModelBuilderConfigurationOptions
{
public DemoModelBuilderConfigurationOptions(
[NotNull] string tablePrefix = "",
[CanBeNull] string? schema = null)
: base(
tablePrefix,
schema)
{
}
}

3
aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/FodyWeavers.xml

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

30
aspnet-core/modules/demo/LINGYUN.Abp.Demo.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>

26
aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/LINGYUN.Abp.Demo.HttpApi.csproj

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\configureawait.props" />
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<IsPackable>false</IsPackable>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LINGYUN.Abp.Demo.Application.Contracts\LINGYUN.Abp.Demo.Application.Contracts.csproj" />
</ItemGroup>
</Project>

28
aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/LINGYUN/Abp/Demo/AbpDemoHttpApiModule.cs

@ -0,0 +1,28 @@
using LINGYUN.Abp.Demo.Localization;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Demo;
[DependsOn(
typeof(AbpAspNetCoreMvcModule),
typeof(AbpDemoApplicationContractsModule))]
public class AbpDemoHttpApiModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IMvcBuilder>(mvcBuilder =>
{
mvcBuilder.AddApplicationPartIfNotExists(typeof(AbpDemoHttpApiModule).Assembly);
});
PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(
typeof(DemoResource),
typeof(AbpDemoApplicationContractsModule).Assembly);
});
}
}

58
aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/LINGYUN/Abp/Demo/Authors/AuthorController.cs

@ -0,0 +1,58 @@
using LINGYUN.Abp.Demo.Permissions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
namespace LINGYUN.Abp.Demo.Authors;
[Controller]
[Authorize(DemoPermissions.Authors.Default)]
[RemoteService(Name = DemoRemoteServiceConsts.RemoteServiceName)]
[Area(DemoRemoteServiceConsts.ModuleName)]
[Route($"api/{DemoRemoteServiceConsts.ModuleName}/authors")]
public class AuthorController : AbpControllerBase, IAuthorAppService
{
private readonly IAuthorAppService _service;
public AuthorController(IAuthorAppService service)
{
_service = service;
}
[HttpPost]
[Authorize(DemoPermissions.Authors.Create)]
public virtual Task<AuthorDto> CreateAsync(CreateAuthorDto input)
{
return _service.CreateAsync(input);
}
[HttpDelete]
[Route("{id}")]
[Authorize(DemoPermissions.Authors.Delete)]
public virtual Task DeleteAsync(Guid id)
{
return _service.DeleteAsync(id);
}
[HttpGet]
[Route("{id}")]
public virtual Task<AuthorDto> GetAsync(Guid id)
{
return _service.GetAsync(id);
}
[HttpGet]
public virtual Task<PagedResultDto<AuthorDto>> GetListAsync(GetAuthorListDto input)
{
return _service.GetListAsync(input);
}
[HttpPut]
[Route("{id}")]
[Authorize(DemoPermissions.Authors.Edit)]
public virtual Task UpdateAsync(Guid id, UpdateAuthorDto input)
{
return _service.UpdateAsync(id, input);
}
}

81
aspnet-core/modules/demo/LINGYUN.Abp.Demo.HttpApi/LINGYUN/Abp/Demo/Books/BookController.cs

@ -0,0 +1,81 @@
using LINGYUN.Abp.Demo.Permissions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Content;
namespace LINGYUN.Abp.Demo.Books;
[Controller]
[Authorize(DemoPermissions.Books.Default)]
[RemoteService(Name = DemoRemoteServiceConsts.RemoteServiceName)]
[Area(DemoRemoteServiceConsts.ModuleName)]
[Route($"api/{DemoRemoteServiceConsts.ModuleName}/books")]
public class BookController : AbpControllerBase, IBookAppService
{
private readonly IBookAppService _service;
public BookController(IBookAppService service)
{
_service = service;
}
[HttpPost]
[Authorize(DemoPermissions.Books.Create)]
public virtual Task<BookDto> CreateAsync(CreateUpdateBookDto input)
{
return _service.CreateAsync(input);
}
[HttpDelete]
[Route("{id}")]
[Authorize(DemoPermissions.Books.Delete)]
public virtual Task DeleteAsync(Guid id)
{
return _service.DeleteAsync(id);
}
[HttpPost]
[Route("import")]
public virtual Task ImportAsync([FromForm] BookImportInput input)
{
return _service.ImportAsync(input);
}
[HttpGet]
[Route("export")]
public virtual Task<IRemoteStreamContent> ExportAsync(BookExportListInput input)
{
return _service.ExportAsync(input);
}
[HttpGet]
[Route("{id}")]
public virtual Task<BookDto> GetAsync(Guid id)
{
return _service.GetAsync(id);
}
[HttpGet]
[Route("lookup")]
public virtual Task<ListResultDto<AuthorLookupDto>> GetAuthorLookupAsync()
{
return _service.GetAuthorLookupAsync();
}
[HttpGet]
public virtual Task<PagedResultDto<BookDto>> GetListAsync(PagedAndSortedResultRequestDto input)
{
return _service.GetListAsync(input);
}
[HttpPut]
[Route("{id}")]
[Authorize(DemoPermissions.Books.Edit)]
public virtual Task<BookDto> UpdateAsync(Guid id, CreateUpdateBookDto input)
{
return _service.UpdateAsync(id, input);
}
}

68
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.Configure.cs

@ -2,8 +2,12 @@
using Elsa.Options;
using LINGYUN.Abp.Aliyun.Localization;
using LINGYUN.Abp.BackgroundTasks;
using LINGYUN.Abp.DataProtectionManagement;
using LINGYUN.Abp.Demo.Books;
using LINGYUN.Abp.Demo.Localization;
using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.Exporter;
using LINGYUN.Abp.Idempotent;
using LINGYUN.Abp.Identity.Session;
using LINGYUN.Abp.IdentityServer.IdentityResources;
@ -37,8 +41,11 @@ using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.Caching.StackExchangeRedis;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Localization;
using Microsoft.IdentityModel.Logging;
using Microsoft.OpenApi.Models;
using MiniExcelLibs.Attributes;
using OpenIddict.Server;
using OpenIddict.Server.AspNetCore;
using Quartz;
@ -455,6 +462,42 @@ public partial class MicroServiceApplicationsSingleModule
});
}
}
/// <summary>
/// 配置数据导出
/// </summary>
private void ConfigureExporter()
{
Configure<AbpExporterMiniExcelOptions>(options =>
{
options.MapExportSetting(typeof(BookDto), config =>
{
config.DynamicColumns = new[]
{
// 忽略某些字段
new DynamicExcelColumn(nameof(BookDto.AuthorId)){ Ignore = true },
new DynamicExcelColumn(nameof(BookDto.LastModificationTime)){ Ignore = true },
new DynamicExcelColumn(nameof(BookDto.LastModifierId)){ Ignore = true },
new DynamicExcelColumn(nameof(BookDto.CreationTime)){ Ignore = true },
new DynamicExcelColumn(nameof(BookDto.CreatorId)){ Ignore = true },
new DynamicExcelColumn(nameof(BookDto.Id)){ Ignore = true },
};
});
});
}
/// <summary>
/// 配置数据权限
/// </summary>
private void ConfigureEntityDataProtected()
{
Configure<DataProtectionManagementOptions>(options =>
{
options.AddEntities(typeof(DemoResource),
new[]
{
typeof(Book),
});
});
}
private void ConfigurePermissionManagement(IConfiguration configuration)
{
@ -813,24 +856,21 @@ public partial class MicroServiceApplicationsSingleModule
services.Replace<CookieAuthenticationHandler, AbpCookieAuthenticationHandler>(ServiceLifetime.Scoped);
services.AddAuthentication()
.AddJwtBearer(options =>
.AddAbpJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = false;
options.Audience = configuration["AuthServer:ApiName"];
options.Events = new JwtBearerEvents
configuration.GetSection("AuthServer").Bind(options);
options.Events ??= new JwtBearerEvents();
options.Events.OnMessageReceived = context =>
{
OnMessageReceived = context =>
var accessToken = context.Request.Query["access_token"];
var path = context.HttpContext.Request.Path;
if (!string.IsNullOrEmpty(accessToken) &&
(path.StartsWithSegments("/api/files")))
{
var accessToken = context.Request.Query["access_token"];
var path = context.HttpContext.Request.Path;
if (!string.IsNullOrEmpty(accessToken) &&
(path.StartsWithSegments("/api/files")))
{
context.Token = accessToken;
}
return Task.CompletedTask;
context.Token = accessToken;
}
return Task.CompletedTask;
};
});

37
aspnet-core/services/LY.MicroService.Applications.Single/MicroServiceApplicationsSingleModule.cs

@ -22,12 +22,17 @@ using LINGYUN.Abp.CachingManagement;
using LINGYUN.Abp.CachingManagement.StackExchangeRedis;
using LINGYUN.Abp.Dapr.Client;
using LINGYUN.Abp.Data.DbMigrator;
using LINGYUN.Abp.DataProtectionManagement;
using LINGYUN.Abp.DataProtectionManagement.EntityFrameworkCore;
using LINGYUN.Abp.Demo;
using LINGYUN.Abp.Demo.EntityFrameworkCore;
using LINGYUN.Abp.Elsa;
using LINGYUN.Abp.Elsa.Activities;
using LINGYUN.Abp.Elsa.EntityFrameworkCore;
using LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql;
using LINGYUN.Abp.ExceptionHandling;
using LINGYUN.Abp.ExceptionHandling.Emailing;
using LINGYUN.Abp.Exporter.MiniExcel;
using LINGYUN.Abp.FeatureManagement;
using LINGYUN.Abp.FeatureManagement.HttpApi;
using LINGYUN.Abp.Features.LimitValidation;
@ -180,25 +185,30 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpOssManagementHttpApiModule),
typeof(AbpOssManagementFileSystemImageSharpModule),
typeof(AbpOssManagementSettingManagementModule),
typeof(PlatformDomainModule),
typeof(PlatformApplicationModule),
typeof(PlatformHttpApiModule),
typeof(PlatformEntityFrameworkCoreModule),
typeof(PlatformSettingsVueVbenAdminModule),
typeof(PlatformThemeVueVbenAdminModule),
typeof(AbpUINavigationVueVbenAdminModule),
typeof(AbpSaasDomainModule),
typeof(AbpSaasApplicationModule),
typeof(AbpSaasHttpApiModule),
typeof(AbpSaasEntityFrameworkCoreModule),
typeof(TaskManagementDomainModule),
typeof(TaskManagementApplicationModule),
typeof(TaskManagementHttpApiModule),
typeof(TaskManagementEntityFrameworkCoreModule),
typeof(AbpTextTemplatingDomainModule),
typeof(AbpTextTemplatingApplicationModule),
typeof(AbpTextTemplatingHttpApiModule),
typeof(AbpTextTemplatingEntityFrameworkCoreModule),
typeof(AbpWebhooksModule),
typeof(AbpWebhooksEventBusModule),
typeof(AbpWebhooksIdentityModule),
@ -207,27 +217,33 @@ namespace LY.MicroService.Applications.Single;
typeof(WebhooksManagementApplicationModule),
typeof(WebhooksManagementHttpApiModule),
typeof(WebhooksManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementApplicationModule),
typeof(AbpFeatureManagementHttpApiModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementDomainModule),
typeof(AbpSettingManagementApplicationModule),
typeof(AbpSettingManagementHttpApiModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpPermissionManagementHttpApiModule),
typeof(AbpPermissionManagementDomainIdentityModule),
// typeof(AbpPermissionManagementDomainIdentityServerModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpPermissionManagementDomainOrganizationUnitsModule), // 组织机构权限管理
typeof(SingleMigrationsEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreMySQLModule),
typeof(AbpAliyunSmsModule),
typeof(AbpAliyunSettingManagementModule),
typeof(AbpAuthenticationQQModule),
typeof(AbpAuthenticationWeChatModule),
typeof(AbpAuthorizationOrganizationUnitsModule),
typeof(AbpIdentityOrganizaztionUnitsModule),
typeof(AbpBackgroundTasksModule),
typeof(AbpBackgroundTasksActivitiesModule),
typeof(AbpBackgroundTasksDistributedLockingModule),
@ -236,23 +252,38 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpBackgroundTasksJobsModule),
typeof(AbpBackgroundTasksNotificationsModule),
typeof(AbpBackgroundTasksQuartzModule),
typeof(AbpDataProtectionManagementApplicationModule),
typeof(AbpDataProtectionManagementHttpApiModule),
typeof(AbpDataProtectionManagementEntityFrameworkCoreModule),
typeof(AbpDemoApplicationModule),
typeof(AbpDemoHttpApiModule),
typeof(AbpDemoEntityFrameworkCoreModule),
typeof(AbpDaprClientModule),
typeof(AbpExceptionHandlingModule),
typeof(AbpEmailingExceptionHandlingModule),
typeof(AbpFeaturesLimitValidationModule),
typeof(AbpFeaturesValidationRedisClientModule),
typeof(AbpAspNetCoreMvcLocalizationModule),
typeof(AbpLocalizationCultureMapModule),
typeof(AbpLocalizationPersistenceModule),
typeof(AbpOpenApiAuthorizationModule),
typeof(AbpIMSignalRModule),
typeof(AbpNotificationsModule),
typeof(AbpNotificationsCommonModule),
typeof(AbpNotificationsSignalRModule),
typeof(AbpNotificationsEmailingModule),
typeof(AbpMultiTenancyEditionsModule),
typeof(AbpTencentQQModule),
typeof(AbpTencentCloudSettingManagementModule),
typeof(AbpIdentityWeChatModule),
typeof(AbpNotificationsWeChatMiniProgramModule),
typeof(AbpWeChatMiniProgramModule),
@ -265,17 +296,21 @@ namespace LY.MicroService.Applications.Single;
typeof(AbpWeChatOfficialHandlersModule),
typeof(AbpWeChatWorkHandlersModule),
typeof(AbpWeChatSettingManagementModule),
typeof(AbpDataDbMigratorModule),
typeof(AbpIdGeneratorModule),
typeof(AbpUINavigationModule),
typeof(AbpAccountTemplatesModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpElsaModule),
typeof(AbpElsaServerModule),
typeof(AbpElsaActivitiesModule),
typeof(AbpElsaEntityFrameworkCoreModule),
typeof(AbpElsaEntityFrameworkCoreMySqlModule),
typeof(AbpExporterMiniExcelModule),
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpHttpClientWrapperModule),
@ -310,6 +345,7 @@ public partial class MicroServiceApplicationsSingleModule : AbpModule
ConfigureWeChat();
ConfigureWrapper();
ConfigureExporter();
ConfigureAuditing();
ConfigureDbContext();
ConfigureIdempotent();
@ -321,6 +357,7 @@ public partial class MicroServiceApplicationsSingleModule : AbpModule
ConfigureBackgroundTasks();
ConfigureExceptionHandling();
ConfigureVirtualFileSystem();
ConfigureEntityDataProtected();
ConfigureUrls(configuration);
ConfigureCaching(configuration);
ConfigureAuditing(configuration);

6
aspnet-core/services/LY.MicroService.Applications.Single/appsettings.Development.json

@ -52,7 +52,8 @@
"TaskManagement": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None",
"Workflow": "Server=127.0.0.1;Database=Workflow-V70;User Id=root;Password=123456;SslMode=None",
"Notifications": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None",
"MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None"
"MessageService": "Server=127.0.0.1;Database=Messages-V70;User Id=root;Password=123456;SslMode=None",
"Demo": "Server=127.0.0.1;Database=Platform-V70;User Id=root;Password=123456;SslMode=None"
},
"DistributedLock": {
"IsEnabled": true,
@ -129,7 +130,8 @@
"AuthServer": {
"UseOpenIddict": true,
"Authority": "http://127.0.0.1:30001/",
"ApiName": "lingyun-abp-application",
"Audience": "lingyun-abp-application",
"RequireHttpsMetadata": false,
"SwaggerClientId": "InternalServiceClient",
"SwaggerClientSecret": "1q2w3E*"
},

Loading…
Cancel
Save