Browse Source

Add new webapp example

pull/41/head
liangshiwei 9 months ago
parent
commit
5ed5af4fab
  1. BIN
      .DS_Store
  2. 2
      .gitignore
  3. 21
      Directory.Packages.props
  4. 15
      README.WebApp.md
  5. 80
      lsw.Abp.AntDesignUI.sln
  6. 10
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorGlobalScriptContributor.cs
  7. 2
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Bundling/AbpStyles.razor
  8. 10
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/DynamicLayoutComponent.razor
  9. 7
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/LayoutHook.razor
  10. 43
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/LayoutHook.razor.cs
  11. 43
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/PageLayout.cs
  12. 3
      modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor
  13. BIN
      samples/.DS_Store
  14. 5
      samples/BookStore/.prettierrc
  15. 16
      samples/BookStore/common.props
  16. 38
      samples/BookStore/src/BookStore.Blazor/BookStore.Blazor.csproj
  17. 89
      samples/BookStore/src/BookStore.Blazor/BookStoreBlazorModule.cs
  18. 14
      samples/BookStore/src/BookStore.Blazor/BookStoreBrandingProvider.cs
  19. 19
      samples/BookStore/src/BookStore.Blazor/BookStoreBundleContributor.cs
  20. 67
      samples/BookStore/src/BookStore.Blazor/Menus/BookStoreMenuContributor.cs
  21. 10
      samples/BookStore/src/BookStore.Blazor/Menus/BookStoreMenus.cs
  22. 27
      samples/BookStore/src/BookStore.Blazor/Pages/Index.razor
  23. 13
      samples/BookStore/src/BookStore.Blazor/Pages/Index.razor.cs
  24. 1
      samples/BookStore/src/BookStore.Blazor/Pages/Index.razor.css
  25. 29
      samples/BookStore/src/BookStore.Blazor/Properties/launchSettings.json
  26. 13
      samples/BookStore/src/BookStore.Blazor/_Imports.razor
  27. 24
      samples/BookStore/src/BookStore.Blazor/wwwroot/appsettings.json
  28. BIN
      samples/BookStore/src/BookStore.Blazor/wwwroot/favicon.ico
  29. 27158
      samples/BookStore/src/BookStore.Blazor/wwwroot/global.css
  30. 59
      samples/BookStore/src/BookStore.Blazor/wwwroot/global.js
  31. 29
      samples/BookStore/src/BookStore.Blazor/wwwroot/index.html
  32. 43
      samples/BookStore/src/BookStore.Blazor/wwwroot/logo.svg
  33. 49
      samples/BookStore/src/BookStore.Blazor/wwwroot/main.css
  34. 55
      samples/BookStore/src/BookStore.BlazorServer/BookStore.BlazorServer.csproj
  35. 245
      samples/BookStore/src/BookStore.BlazorServer/BookStoreBlazorModule.cs
  36. 10
      samples/BookStore/src/BookStore.BlazorServer/BookStoreBrandingProvider.cs
  37. 52
      samples/BookStore/src/BookStore.BlazorServer/Menus/BookStoreMenuContributor.cs
  38. 24
      samples/BookStore/src/BookStore.BlazorServer/Pages/Index.razor
  39. 15
      samples/BookStore/src/BookStore.BlazorServer/Pages/Index.razor.cs
  40. 1
      samples/BookStore/src/BookStore.BlazorServer/Pages/Index.razor.css
  41. 40
      samples/BookStore/src/BookStore.BlazorServer/Pages/_Host.cshtml
  42. 4
      samples/BookStore/src/BookStore.BlazorServer/Pages/_ViewImports.cshtml
  43. 12
      samples/BookStore/src/BookStore.BlazorServer/_Imports.razor
  44. 16
      samples/BookStore/src/BookStore.BlazorServer/appsettings.json
  45. 424
      samples/BookStore/src/BookStore.BlazorServer/package-lock.json
  46. 9
      samples/BookStore/src/BookStore.BlazorServer/package.json
  47. 1
      samples/BookStore/src/BookStore.BlazorServer/tempkey.jwk
  48. BIN
      samples/BookStore/src/BookStore.BlazorServer/wwwroot/favicon.ico
  49. 3
      samples/BookStore/src/BookStore.BlazorServer/wwwroot/global-styles.css
  50. 335
      samples/BookStore/src/BookStore.BlazorServer/yarn.lock
  51. 53
      samples/BookStore/src/BookStore.DbMigrator/BookStore.DbMigrator.csproj
  52. 19
      samples/BookStore/src/BookStore.DbMigrator/BookStoreDbMigratorModule.cs
  53. 10
      samples/BookStore/src/BookStore.DbMigrator/Properties/launchSettings.json
  54. 33
      samples/BookStore/src/BookStore.DbMigrator/appsettings.json
  55. 2
      samples/BookStore/src/BookStore.DbMigrator/appsettings.secrets.json
  56. 1
      samples/BookStore/src/BookStore.DbMigrator/tempkey.jwk
  57. 13
      samples/BookStore/src/BookStore.DbMigrator/tempkey.rsa
  58. 58
      samples/BookStore/src/BookStore.Domain.Shared/BookStoreDomainSharedModule.cs
  59. 82
      samples/BookStore/src/BookStore.Domain.Shared/BookStoreModuleExtensionConfigurator.cs
  60. 7
      samples/BookStore/src/BookStore.Domain.Shared/Identity/IdentityUserType.cs
  61. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/ar.json
  62. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/cs.json
  63. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/de-DE.json
  64. 11
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/en.json
  65. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/es.json
  66. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/fi.json
  67. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/fr.json
  68. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/hi.json
  69. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/hu.json
  70. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/is.json
  71. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/it.json
  72. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/nl.json
  73. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/pl-PL.json
  74. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/pt-BR.json
  75. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/ro-RO.json
  76. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/ru.json
  77. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/sk.json
  78. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/sl.json
  79. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/tr.json
  80. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/vi.json
  81. 11
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/zh-Hans.json
  82. 8
      samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/zh-Hant.json
  83. 8
      samples/BookStore/src/BookStore.Domain/BookStoreConsts.cs
  84. 219
      samples/BookStore/src/BookStore.Domain/Data/BookStoreDbMigrationService.cs
  85. 306
      samples/BookStore/src/BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs
  86. 30
      samples/BookStore/src/BookStore.EntityFrameworkCore/BookStore.EntityFrameworkCore.csproj
  87. 87
      samples/BookStore/src/BookStore.EntityFrameworkCore/EntityFrameworkCore/BookStoreDbContext.cs
  88. 32
      samples/BookStore/src/BookStore.EntityFrameworkCore/EntityFrameworkCore/BookStoreDbContextFactory.cs
  89. 44
      samples/BookStore/src/BookStore.EntityFrameworkCore/EntityFrameworkCore/BookStoreEfCoreEntityExtensionMappings.cs
  90. 51
      samples/BookStore/src/BookStore.EntityFrameworkCore/EntityFrameworkCore/BookStoreEntityFrameworkCoreModule.cs
  91. 34
      samples/BookStore/src/BookStore.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreBookStoreDbSchemaMigrator.cs
  92. 2683
      samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20250516090951_initial.Designer.cs
  93. 1592
      samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20250516090951_initial.cs
  94. 2680
      samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/BookStoreDbContextModelSnapshot.cs
  95. 2
      samples/BookStore/src/BookStore.EntityFrameworkCore/Properties/AssemblyInfo.cs
  96. 39
      samples/BookStore/src/BookStore.HttpApi.Host/BookStore.HttpApi.Host.csproj
  97. 10
      samples/BookStore/src/BookStore.HttpApi.Host/BookStoreBrandingProvider.cs
  98. 250
      samples/BookStore/src/BookStore.HttpApi.Host/BookStoreHttpApiHostModule.cs
  99. 12
      samples/BookStore/src/BookStore.HttpApi.Host/Controllers/HomeController.cs
  100. 53
      samples/BookStore/src/BookStore.HttpApi.Host/Program.cs

BIN
.DS_Store

Binary file not shown.

2
.gitignore

@ -403,3 +403,5 @@ FodyWeavers.xsd
samples/BookStore/src/BookStore.BlazorServer/wwwroot/libs/
samples/BookStore/src/BookStore.HttpApi.Host/wwwroot/libs/
.DS_Store

21
Directory.Packages.props

@ -1,6 +1,8 @@
<Project>
<PropertyGroup>
<VoloAbpPackageVersion>9.2.1</VoloAbpPackageVersion>
<VoloAbpLeptonxPackageVersion>4.2.0</VoloAbpLeptonxPackageVersion>
<VoloAbpStudioPackageVersion>1.0.1</VoloAbpStudioPackageVersion>
<AntPackageVersion>1.4.2</AntPackageVersion>
<MicrosoftExtensionsPackageVersion>9.0.6</MicrosoftExtensionsPackageVersion>
<MicrosoftAspNetCorePackageVersion>9.0.6</MicrosoftAspNetCorePackageVersion>
@ -9,7 +11,6 @@
</PropertyGroup>
<!-- Abp Framework -->
<ItemGroup>
<PackageVersion Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="4.1.3" />
<PackageVersion Include="Volo.Abp.Account.Application" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Account.Application.Contracts" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Account.HttpApi" Version="$(VoloAbpPackageVersion)" />
@ -105,7 +106,13 @@
<PackageVersion Include="Volo.Abp.FeatureManagement.MongoDB" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.OpenIddict.MongoDB" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Studio.Client.AspNetCore" Version="$(VoloAbpStudioPackageVersion)" />
<PackageVersion Include="Volo.Abp.BlobStoring.Database.MongoDB" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.BlobStoring.Database.Domain" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.BlobStoring.Database.Domain.Shared" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.Caching" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.GlobalFeatures" Version="$(VoloAbpPackageVersion)" />
<PackageVersion Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="$(VoloAbpLeptonxPackageVersion)" />
</ItemGroup>
<!-- .NET Blazor-->
<ItemGroup>
@ -144,7 +151,7 @@
<PackageVersion Include="Shouldly" Version="4.2.1" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.extensibility.execution" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.1" />
</ItemGroup>
<!-- Fody -->
<ItemGroup>
@ -153,10 +160,10 @@
</ItemGroup>
<!-- Other -->
<ItemGroup>
<PackageVersion Include="EphemeralMongo.Core" Version="1.1.3" />
<PackageVersion Include="EphemeralMongo6.runtime.linux-x64" Version="1.1.3" />
<PackageVersion Include="EphemeralMongo6.runtime.osx-x64" Version="1.1.3" />
<PackageVersion Include="EphemeralMongo6.runtime.win-x64" Version="1.1.3" />
<PackageVersion Include="MongoSandbox.Core" Version="2.0.0" />
<PackageVersion Include="MongoSandbox8.runtime.linux-x64" Version="2.0.0" />
<PackageVersion Include="MongoSandbox8.runtime.osx-arm64" Version="2.0.0" />
<PackageVersion Include="MongoSandbox8.runtime.win-x64" Version="2.0.0" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
</ItemGroup>
<ItemGroup>

15
README.WebApp.md

@ -1,26 +1,29 @@
The first step is to use ABP CLI to create a new project.
`abp new BookStoreWebApp -u blazor-webapp -t app`
`abp new BookStore -u blazor-webapp -t app`
> See the [ABP official documentation](https://docs.abp.io) to learn [ABP framework](https://github.com/abpframework/abp).
**Replace LeptonXLiteTheme with AntBlazorTheme packages**
* Replace `Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme` with `Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme`
* Replace `Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme.Bundling` with `Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme.Bundling`
* Replace `Volo.Abp.Identity.Blazor.WebAssembly` with `Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI`
* Replace `Volo.Abp.SettingManagement.Blazor.WebAssembly` with `Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI`
* Replace `Volo.Abp.TenantManagement.Blazor.WebAssembly` with `Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI`
* Replace `Volo.Abp.FeatureManagement.Blazor.WebAssembly` with `Lsw.Abp.FeatureManagement.Blazor.WebAssembly.AntDesignUI`
* Replace `Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme` with `Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme`
* Replace `Volo.Abp.Identity.Blazor.Server` with `Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI`
* Replace `Volo.Abp.SettingManagement.Blazor.Server` with `Lsw.Abp.SettingManagement.Blazor.Server.AntDesignUI`
* Replace `Volo.Abp.TenantManagement.Blazor.Server` with `Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI`
* Replace `Volo.Abp.FeatureManagement.Blazor.Server` with `Lsw.Abp.FeatureManagement.Blazor.Server.AntDesignUI`
**Remove all Blazorise packages.**
**Replace BlazorLeptonXLiteThemeBundles with BlazorAntDesignThemeBundles**
**Replace `BlazorLeptonXLiteThemeBundles` with `BlazorAntDesignThemeBundles`**
**Open `_Imports.razor` and add with the following:**
@ -33,7 +36,7 @@ The first step is to use ABP CLI to create a new project.
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Bundling
```
**Open `BookStoreWebAppBlazorModule` make the following changes:**
**Open `BookStoreBlazorModule` make the following changes:**
* Remove the `ConfigureBlazorise` method
* Fix wrong using namespace
@ -41,7 +44,7 @@ The first step is to use ABP CLI to create a new project.
* For example: replace `AbpIdentityBlazorServerModule` with `AbpIdentityBlazorServerAntDesignModule`
* For example: replace `AbpAspNetCoreComponentsServerLeptonXLiteThemeModule` with `AbpAspNetCoreComponentsServerAntDesignThemeModule`
**Open `BookStoreWebAppBlazorClientModule` make the following changes:**
**Open `BookStoreBlazorClientModule` make the following changes:**
* Remove the `ConfigureBlazorise` method
* Fix wrong using namespace
@ -76,7 +79,7 @@ The first step is to use ABP CLI to create a new project.
```csharp
@page "/"
@inherits BookStoreWebAppComponentBase
@inherits BookStoreComponentBase
<AbpPageHeader Title="Index"></AbpPageHeader>
@ -94,7 +97,7 @@ The first step is to use ABP CLI to create a new project.
</div>
```
Run the `dotnet build` & `abp bundle` command in the `BookStoreWebApp.Blazor.Client` folder.
Run the `dotnet build` & `abp bundle` command in the `BookStore.Blazor.Client` folder.
That's all, enjoy your code :).

80
lsw.Abp.AntDesignUI.sln

@ -11,28 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "modules", "modules", "{0C43
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{E36D7268-C7A6-4A7F-81DB-57070F4B049C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BookStore", "BookStore", "{1F85F600-70F9-4286-B8BD-6A124D9DC43D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.Application", "samples\BookStore\src\BookStore.Application\BookStore.Application.csproj", "{39E479A5-92DB-4F5B-918A-1920886D4D60}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.Application.Contracts", "samples\BookStore\src\BookStore.Application.Contracts\BookStore.Application.Contracts.csproj", "{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.Blazor", "samples\BookStore\src\BookStore.Blazor\BookStore.Blazor.csproj", "{2A93E06E-1046-415B-81AC-D02995701EB6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.DbMigrator", "samples\BookStore\src\BookStore.DbMigrator\BookStore.DbMigrator.csproj", "{ED293EED-7565-45DB-806B-80AB348E76EB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.Domain", "samples\BookStore\src\BookStore.Domain\BookStore.Domain.csproj", "{6280984E-3E41-4DD9-AFF4-502F99EC1ADB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.Domain.Shared", "samples\BookStore\src\BookStore.Domain.Shared\BookStore.Domain.Shared.csproj", "{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.EntityFrameworkCore", "samples\BookStore\src\BookStore.EntityFrameworkCore\BookStore.EntityFrameworkCore.csproj", "{10ABF4AB-D8A0-46C0-8017-61455CEF2570}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.HttpApi", "samples\BookStore\src\BookStore.HttpApi\BookStore.HttpApi.csproj", "{5290EAE2-F272-479D-BB76-0C059EEBA077}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.HttpApi.Client", "samples\BookStore\src\BookStore.HttpApi.Client\BookStore.HttpApi.Client.csproj", "{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.HttpApi.Host", "samples\BookStore\src\BookStore.HttpApi.Host\BookStore.HttpApi.Host.csproj", "{8223814F-FD5F-4D77-8C37-6B578333ADE6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PermissionManagement", "PermissionManagement", "{30DCF9C7-BEA3-46D8-83C4-748FF24FFB96}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lsw.Abp.PermissionManagement.Blazor.AntDesignUI", "modules\PermissionManagement\Lsw.Abp.PermissionManagement.Blazor.AntDesignUI\Lsw.Abp.PermissionManagement.Blazor.AntDesignUI.csproj", "{FD90132E-3B0E-4677-A7CE-8783FCC5E427}"
@ -81,8 +59,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lsw.Abp.AspnetCore.Componen
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme", "modules\AntDesignTheme\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme.csproj", "{90DBF0A4-253D-4E75-8221-17455B404551}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStore.BlazorServer", "samples\BookStore\src\BookStore.BlazorServer\BookStore.BlazorServer.csproj", "{2B617147-6496-44E9-8D49-B571E7EBF2D6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".Solution Items", ".Solution Items", "{75E22D62-7BE3-4166-BBD5-17B35B0AB2CA}"
ProjectSection(SolutionItems) = preProject
Directory.Packages.props = Directory.Packages.props
@ -101,46 +77,6 @@ Global
{9EA4AA35-DEFC-4C25-8333-78137853EC5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9EA4AA35-DEFC-4C25-8333-78137853EC5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9EA4AA35-DEFC-4C25-8333-78137853EC5D}.Release|Any CPU.Build.0 = Release|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Debug|Any CPU.Build.0 = Debug|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Release|Any CPU.ActiveCfg = Release|Any CPU
{39E479A5-92DB-4F5B-918A-1920886D4D60}.Release|Any CPU.Build.0 = Release|Any CPU
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640}.Release|Any CPU.Build.0 = Release|Any CPU
{2A93E06E-1046-415B-81AC-D02995701EB6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A93E06E-1046-415B-81AC-D02995701EB6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A93E06E-1046-415B-81AC-D02995701EB6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A93E06E-1046-415B-81AC-D02995701EB6}.Release|Any CPU.Build.0 = Release|Any CPU
{ED293EED-7565-45DB-806B-80AB348E76EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{ED293EED-7565-45DB-806B-80AB348E76EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{ED293EED-7565-45DB-806B-80AB348E76EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{ED293EED-7565-45DB-806B-80AB348E76EB}.Release|Any CPU.Build.0 = Release|Any CPU
{6280984E-3E41-4DD9-AFF4-502F99EC1ADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6280984E-3E41-4DD9-AFF4-502F99EC1ADB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6280984E-3E41-4DD9-AFF4-502F99EC1ADB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6280984E-3E41-4DD9-AFF4-502F99EC1ADB}.Release|Any CPU.Build.0 = Release|Any CPU
{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA}.Release|Any CPU.Build.0 = Release|Any CPU
{10ABF4AB-D8A0-46C0-8017-61455CEF2570}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{10ABF4AB-D8A0-46C0-8017-61455CEF2570}.Debug|Any CPU.Build.0 = Debug|Any CPU
{10ABF4AB-D8A0-46C0-8017-61455CEF2570}.Release|Any CPU.ActiveCfg = Release|Any CPU
{10ABF4AB-D8A0-46C0-8017-61455CEF2570}.Release|Any CPU.Build.0 = Release|Any CPU
{5290EAE2-F272-479D-BB76-0C059EEBA077}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5290EAE2-F272-479D-BB76-0C059EEBA077}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5290EAE2-F272-479D-BB76-0C059EEBA077}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5290EAE2-F272-479D-BB76-0C059EEBA077}.Release|Any CPU.Build.0 = Release|Any CPU
{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A}.Release|Any CPU.Build.0 = Release|Any CPU
{8223814F-FD5F-4D77-8C37-6B578333ADE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8223814F-FD5F-4D77-8C37-6B578333ADE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8223814F-FD5F-4D77-8C37-6B578333ADE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8223814F-FD5F-4D77-8C37-6B578333ADE6}.Release|Any CPU.Build.0 = Release|Any CPU
{FD90132E-3B0E-4677-A7CE-8783FCC5E427}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD90132E-3B0E-4677-A7CE-8783FCC5E427}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD90132E-3B0E-4677-A7CE-8783FCC5E427}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -213,10 +149,6 @@ Global
{90DBF0A4-253D-4E75-8221-17455B404551}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90DBF0A4-253D-4E75-8221-17455B404551}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90DBF0A4-253D-4E75-8221-17455B404551}.Release|Any CPU.Build.0 = Release|Any CPU
{2B617147-6496-44E9-8D49-B571E7EBF2D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2B617147-6496-44E9-8D49-B571E7EBF2D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2B617147-6496-44E9-8D49-B571E7EBF2D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2B617147-6496-44E9-8D49-B571E7EBF2D6}.Release|Any CPU.Build.0 = Release|Any CPU
{9FE3143F-08A8-444F-B6B9-D4533FB57674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9FE3143F-08A8-444F-B6B9-D4533FB57674}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9FE3143F-08A8-444F-B6B9-D4533FB57674}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -227,17 +159,6 @@ Global
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9EA4AA35-DEFC-4C25-8333-78137853EC5D} = {6C9F4322-BDC7-42DA-ACBD-1AC641B907B4}
{1F85F600-70F9-4286-B8BD-6A124D9DC43D} = {E36D7268-C7A6-4A7F-81DB-57070F4B049C}
{39E479A5-92DB-4F5B-918A-1920886D4D60} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{BBBBFA7B-B24D-4ED4-9DAE-71A60EDAA640} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{2A93E06E-1046-415B-81AC-D02995701EB6} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{ED293EED-7565-45DB-806B-80AB348E76EB} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{6280984E-3E41-4DD9-AFF4-502F99EC1ADB} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{68F43D62-A034-4BFE-8FAF-AE8FD337F7EA} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{10ABF4AB-D8A0-46C0-8017-61455CEF2570} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{5290EAE2-F272-479D-BB76-0C059EEBA077} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{DD6FEF71-BAD5-498C-BEB9-5B7AB77B3E4A} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{8223814F-FD5F-4D77-8C37-6B578333ADE6} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{30DCF9C7-BEA3-46D8-83C4-748FF24FFB96} = {0C432416-770F-4331-84E6-5835408A9BD8}
{FD90132E-3B0E-4677-A7CE-8783FCC5E427} = {30DCF9C7-BEA3-46D8-83C4-748FF24FFB96}
{8EC75594-FF27-4590-A726-B0C240EC0DC6} = {0C432416-770F-4331-84E6-5835408A9BD8}
@ -262,7 +183,6 @@ Global
{BBA243C1-EEAD-42EE-ABA3-6912BE5F41D8} = {9F013513-EC16-46DF-BDEF-C9B5F0DA6C12}
{2DCCFE7C-4BC5-46F8-8493-82352CE0EE71} = {9F013513-EC16-46DF-BDEF-C9B5F0DA6C12}
{90DBF0A4-253D-4E75-8221-17455B404551} = {9F013513-EC16-46DF-BDEF-C9B5F0DA6C12}
{2B617147-6496-44E9-8D49-B571E7EBF2D6} = {1F85F600-70F9-4286-B8BD-6A124D9DC43D}
{9FE3143F-08A8-444F-B6B9-D4533FB57674} = {9F013513-EC16-46DF-BDEF-C9B5F0DA6C12}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution

10
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme/Bundling/BlazorGlobalScriptContributor.cs

@ -1,4 +1,7 @@
using System.Collections.Generic;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.Components.Web;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling;
@ -7,7 +10,12 @@ public class BlazorGlobalScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/_framework/blazor.server.js");
var options = context.ServiceProvider.GetRequiredService<IOptions<AbpAspNetCoreComponentsWebOptions>>().Value;
if (!options.IsBlazorWebApp)
{
context.Files.AddIfNotContains("/_framework/blazor.server.js");
}
context.Files.AddIfNotContains("/_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/abp.js");
context.Files.AddIfNotContains("/_content/Volo.Abp.AspNetCore.Components.Web/libs/abp/js/authentication-state-listener.js");
}
}

2
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Bundling/AbpStyles.razor

@ -71,4 +71,4 @@
}
public void Dispose() => _persistingSubscription.Dispose();
}
}

10
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/DynamicLayoutComponent.razor

@ -0,0 +1,10 @@
@using Microsoft.Extensions.Options
@inject IOptions<AbpDynamicLayoutComponentOptions> AbpDynamicLayoutComponentOptions
@if (AbpDynamicLayoutComponentOptions.Value.Components.Any())
{
foreach (var (componentType, parameters) in AbpDynamicLayoutComponentOptions.Value.Components)
{
<DynamicComponent Type="@componentType" Parameters="@parameters" />
}
}

7
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/LayoutHook.razor

@ -0,0 +1,7 @@
@if (LayoutHookViewModel.Hooks.Any())
{
foreach (var hook in LayoutHookViewModel.Hooks)
{
<DynamicComponent Type="@hook.ComponentType" />
}
}

43
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Components/LayoutHook.razor.cs

@ -0,0 +1,43 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Options;
using Volo.Abp.Ui.LayoutHooks;
namespace Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Components;
public partial class LayoutHook : ComponentBase
{
[Parameter]
public string Name { get; set; } = default!;
[Parameter]
public string? Layout { get; set; }
[Inject]
protected IOptions<AbpLayoutHookOptions> LayoutHookOptions { get; set; } = default!;
protected LayoutHookViewModel LayoutHookViewModel { get; private set; } = default!;
protected override Task OnInitializedAsync()
{
if (LayoutHookOptions.Value.Hooks.TryGetValue(Name, out var layoutHooks))
{
layoutHooks = layoutHooks
.Where(x => IsComponentBase(x) && (string.IsNullOrWhiteSpace(x.Layout) || x.Layout == Layout))
.ToList();
}
layoutHooks ??= new List<LayoutHookInfo>();
LayoutHookViewModel = new LayoutHookViewModel(layoutHooks.ToArray(), Layout);
return Task.CompletedTask;
}
protected virtual bool IsComponentBase(LayoutHookInfo layoutHook)
{
return typeof(ComponentBase).IsAssignableFrom(layoutHook.ComponentType);
}
}

43
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Layout/PageLayout.cs

@ -1,5 +1,6 @@
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using Lsw.Abp.AntDesignUI;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.PageToolbars;
using Volo.Abp.DependencyInjection;
@ -8,22 +9,44 @@ namespace Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout;
public class PageLayout : IScopedDependency, INotifyPropertyChanged
{
private string _title;
private string? title;
// TODO: Consider using this property for setting Page Title too.
public virtual string Title
{
get => _title;
public virtual string? Title {
get => title;
set {
title = value;
OnPropertyChanged();
}
}
private string? menuItemName;
public string? MenuItemName {
get => menuItemName;
set
{
_title = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Title)));
menuItemName = value;
OnPropertyChanged();
}
}
public virtual ObservableCollection<AbpBreadcrumbItem> BreadcrumbItems { get; set; } = new();
public virtual ObservableCollection<AbpBreadcrumbItem> BreadcrumbItems { get; } = new();
public virtual ObservableCollection<PageToolbarItem> ToolbarItems { get; set; } = new();
public virtual ObservableCollection<AbpBreadcrumbItem> ToolbarItems { get; } = new();
public event PropertyChangedEventHandler PropertyChanged;
}
public event PropertyChangedEventHandler? PropertyChanged;
protected void OnPropertyChanged([CallerMemberName] string? propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public void Reset()
{
Title = string.Empty;
MenuItemName = string.Empty;
BreadcrumbItems.Clear();
ToolbarItems.Clear();
}
}

3
modules/AntDesignTheme/Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme/Themes/AntDesignTheme/DefaultLayout.razor

@ -1,6 +1,7 @@
@inherits LayoutComponentBase
@using Microsoft.Extensions.Options
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Settings
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Components
@inject IOptions<AbpAntDesignThemeOptions> Options
@ -19,6 +20,7 @@
<div class="ant-design-body-content">
@Body
</div>
<DynamicLayoutComponent />
<UiPageProgress/>
</Content>
<Footer Class="ant-design-footer"></Footer>
@ -66,6 +68,7 @@ else
<ReuseTabs Class="ant-design-body-reusetabs" TabPaneClass="ant-design-body-reusetabs-tabpane" Draggable></ReuseTabs>
}
</div>
<DynamicLayoutComponent />
<UiPageProgress/>
</Content>
<Footer Class="ant-design-footer"></Footer>

BIN
samples/.DS_Store

Binary file not shown.

5
samples/BookStore/.prettierrc

@ -1,5 +0,0 @@
{
"singleQuote": true,
"useTabs": false,
"tabWidth": 4
}

16
samples/BookStore/common.props

@ -1,16 +0,0 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<AbpProjectType>app</AbpProjectType>
<!--<VoloAbpPackageVersion>8.3.0</VoloAbpPackageVersion>-->
</PropertyGroup>
<Target Name="NoWarnOnRazorViewImportedTypeConflicts" BeforeTargets="RazorCoreCompile">
<PropertyGroup>
<NoWarn>$(NoWarn);0436</NoWarn>
</PropertyGroup>
</Target>
</Project>

38
samples/BookStore/src/BookStore.Blazor/BookStore.Blazor.csproj

@ -1,38 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
</PropertyGroup>
<ItemGroup>
<!-- <PackageReference Include="Blazorise.Bootstrap5" Version="0.9.5.4" />-->
<!-- <PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.5.4" />-->
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" />
<PackageReference Include="Volo.Abp.AutoMapper" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac.WebAssembly" />
<!-- <PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme" Version="8.0.0" />-->
</ItemGroup>
<ItemGroup>
<!-- <PackageReference Include="Volo.Abp.Identity.Blazor.WebAssembly" Version="8.0.0" />-->
<!-- <PackageReference Include="Volo.Abp.TenantManagement.Blazor.WebAssembly" Version="8.0.0" />-->
<!-- <PackageReference Include="Volo.Abp.SettingManagement.Blazor.WebAssembly" Version="8.0.0" />-->
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\modules\IdentityManagement\Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI\Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI.csproj" />
<ProjectReference Include="..\..\..\..\modules\AntDesignTheme\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme\Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme.csproj" />
<ProjectReference Include="..\..\..\..\modules\SettingManagement\Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI\Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI.csproj" />
<ProjectReference Include="..\..\..\..\modules\TenantManagement\Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI\Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI.csproj" />
<ProjectReference Include="..\..\src\BookStore.HttpApi.Client\BookStore.HttpApi.Client.csproj" />
</ItemGroup>
</Project>

89
samples/BookStore/src/BookStore.Blazor/BookStoreBlazorModule.cs

@ -1,89 +0,0 @@
using System;
using System.Net.Http;
using IdentityModel;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using BookStore.Blazor.Menus;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Themes.AntDesignTheme;
using Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme;
using Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI;
using Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI;
using Volo.Abp.Autofac.WebAssembly;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI;
using Volo.Abp.UI.Navigation;
namespace BookStore.Blazor;
[DependsOn(
typeof(AbpAutofacWebAssemblyModule),
typeof(BookStoreHttpApiClientModule),
typeof(AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule),
typeof(AbpAutoMapperModule),
typeof(AbpIdentityBlazorWebAssemblyAntDesignModule),
typeof(AbpTenantManagementBlazorWebAssemblyAntDesignModule),
typeof(AbpSettingManagementBlazorWebAssemblyAntDesignModule)
)]
public class BookStoreBlazorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var environment = context.Services.GetSingletonInstance<IWebAssemblyHostEnvironment>();
var builder = context.Services.GetSingletonInstance<WebAssemblyHostBuilder>();
ConfigureAuthentication(builder);
ConfigureHttpClient(context, environment);
ConfigureRouter(context);
ConfigureUI(builder);
ConfigureMenu(context);
ConfigureAutoMapper(context);
}
private void ConfigureRouter(ServiceConfigurationContext context)
{
Configure<AbpRouterOptions>(options => { options.AppAssembly = typeof(BookStoreBlazorModule).Assembly; });
}
private void ConfigureMenu(ServiceConfigurationContext context)
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new BookStoreMenuContributor(context.Services.GetConfiguration()));
});
}
private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
{
builder.Services.AddOidcAuthentication(options =>
{
builder.Configuration.Bind("AuthServer", options.ProviderOptions);
options.UserOptions.RoleClaim = JwtClaimTypes.Role;
options.ProviderOptions.DefaultScopes.Add("BookStore");
options.ProviderOptions.DefaultScopes.Add("role");
options.ProviderOptions.DefaultScopes.Add("email");
options.ProviderOptions.DefaultScopes.Add("phone");
});
}
private static void ConfigureUI(WebAssemblyHostBuilder builder)
{
builder.RootComponents.Add<App>("#ApplicationContainer");
}
private static void ConfigureHttpClient(ServiceConfigurationContext context,
IWebAssemblyHostEnvironment environment)
{
context.Services.AddTransient(sp => new HttpClient
{
BaseAddress = new Uri(environment.BaseAddress)
});
}
private void ConfigureAutoMapper(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options => { options.AddMaps<BookStoreBlazorModule>(); });
}
}

14
samples/BookStore/src/BookStore.Blazor/BookStoreBrandingProvider.cs

@ -1,14 +0,0 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Ui.Branding;
namespace BookStore.Blazor;
[Dependency(ReplaceServices = true)]
public class BookStoreBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "BookStore";
public override string LogoUrl => "logo.svg";
// public override string LogoReverseUrl => "logo.svg";
}

19
samples/BookStore/src/BookStore.Blazor/BookStoreBundleContributor.cs

@ -1,19 +0,0 @@
using Volo.Abp.Bundling;
namespace BookStore.Blazor;
/* Add your global styles/scripts here.
* See https://docs.abp.io/en/abp/latest/UI/Blazor/Global-Scripts-Styles to learn how to use it
*/
public class BookStoreBundleContributor : IBundleContributor
{
public void AddScripts(BundleContext context)
{
}
public void AddStyles(BundleContext context)
{
context.Add("main.css", true);
}
}

67
samples/BookStore/src/BookStore.Blazor/Menus/BookStoreMenuContributor.cs

@ -1,67 +0,0 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using BookStore.Localization;
using Volo.Abp.Account.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.UI.Navigation;
using Volo.Abp.Users;
namespace BookStore.Blazor.Menus;
public class BookStoreMenuContributor : IMenuContributor
{
private readonly IConfiguration _configuration;
public BookStoreMenuContributor(IConfiguration configuration)
{
_configuration = configuration;
}
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
else if (context.Menu.Name == StandardMenus.User)
{
await ConfigureUserMenuAsync(context);
}
}
private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
var l = context.GetLocalizer<BookStoreResource>();
context.Menu.Items.Insert(
0,
new ApplicationMenuItem(
BookStoreMenus.Home,
l["Menu:Home"],
"/",
icon: "home"
)
);
return Task.CompletedTask;
}
private Task ConfigureUserMenuAsync(MenuConfigurationContext context)
{
var accountStringLocalizer = context.GetLocalizer<AccountResource>();
var identityServerUrl = _configuration["AuthServer:Authority"] ?? "";
context.Menu.AddItem(new ApplicationMenuItem(
"Account.Manage",
accountStringLocalizer["MyAccount"],
$"{identityServerUrl.EnsureEndsWith('/')}Account/Manage?returnUrl={_configuration["App:SelfUrl"]}",
icon: "fa fa-cog",
order: 1000,
null).RequireAuthenticated());
return Task.CompletedTask;
}
}

10
samples/BookStore/src/BookStore.Blazor/Menus/BookStoreMenus.cs

@ -1,10 +0,0 @@
namespace BookStore.Blazor.Menus;
public class BookStoreMenus
{
private const string Prefix = "BookStore";
public const string Home = Prefix + ".Home";
//Add your menu items here...
}

27
samples/BookStore/src/BookStore.Blazor/Pages/Index.razor

@ -1,27 +0,0 @@
@page "/"
@using Volo.Abp.MultiTenancy
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Settings
@inherits BookStoreComponentBase
@* @inject ICurrentTenant CurrentTenant *@
@inject AuthenticationStateProvider AuthenticationStateProvider
<div class="page-content">
<div style="text-align: center">
<Alert Type="@AlertType.Success"
Message="Success"
Description=" Congratulations, BookStore is successfully running!"
ShowIcon="true"/>
<Divider/>
<p>@L["LongWelcomeMessage"]</p>
@if (!CurrentUser.IsAuthenticated)
{
<a class="ant-btn ant-btn-primary" href="/authentication/login">
@L["Login"]
</a>
}
</div>
</div>

13
samples/BookStore/src/BookStore.Blazor/Pages/Index.razor.cs

@ -1,13 +0,0 @@
using System.Threading.Tasks;
using AntDesign;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Settings;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Options;
namespace BookStore.Blazor.Pages;
public partial class Index
{
}

1
samples/BookStore/src/BookStore.Blazor/Pages/Index.razor.css

@ -1 +0,0 @@
/* Write here your styles for the Index page */

29
samples/BookStore/src/BookStore.Blazor/Properties/launchSettings.json

@ -1,29 +0,0 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:44307",
"sslPort": 44307
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"BookStore.Blazor": {
"commandName": "Project",
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "https://localhost:44307",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

13
samples/BookStore/src/BookStore.Blazor/_Imports.razor

@ -1,13 +0,0 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.WebAssembly.Http
@using Microsoft.JSInterop
@using Volo.Abp.AspNetCore.Components.Web
@using BookStore.Blazor
@using AntDesign
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components

24
samples/BookStore/src/BookStore.Blazor/wwwroot/appsettings.json

@ -1,24 +0,0 @@
{
"App": {
"SelfUrl": "https://localhost:44307"
},
"AuthServer": {
"Authority": "https://localhost:44306",
"ClientId": "BookStore_Blazor",
"ResponseType": "code"
},
"RemoteServices": {
"Default": {
"BaseUrl": "https://localhost:44306"
}
},
"AbpCli": {
"Bundle": {
"Mode": "BundleAndMinify", /* Options: None, Bundle, BundleAndMinify */
"Name": "global",
"Parameters": {
}
}
}
}

BIN
samples/BookStore/src/BookStore.Blazor/wwwroot/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

27158
samples/BookStore/src/BookStore.Blazor/wwwroot/global.css

File diff suppressed because it is too large

59
samples/BookStore/src/BookStore.Blazor/wwwroot/global.js

File diff suppressed because one or more lines are too long

29
samples/BookStore/src/BookStore.Blazor/wwwroot/index.html

@ -1,29 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>BookStore.Blazor</title>
<base href="/" />
<!--ABP:Styles-->
<link href="global.css?_v=638691865248680701" rel="stylesheet"/>
<link href="main.css" rel="stylesheet"/>
<!--/ABP:Styles-->
<link href="BookStore.Blazor.styles.css" rel="stylesheet"/>
</head>
<body class="abp-application-layout bg-light">
<div id="ApplicationContainer">
<div class="spinner">
<div class="double-bounce1"></div>
<div class="double-bounce2"></div>
</div>
</div>
<!--ABP:Scripts-->
<script src="global.js?_v=638691865250004542"></script>
<!--/ABP:Scripts-->
</body>
</html>

43
samples/BookStore/src/BookStore.Blazor/wwwroot/logo.svg

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="200px" height="200px" viewBox="0 0 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 47.1 (45422) - http://www.bohemiancoding.com/sketch -->
<title>Group 28 Copy 5</title>
<desc>Created with Sketch.</desc>
<defs>
<linearGradient x1="62.1023273%" y1="0%" x2="108.19718%" y2="37.8635764%" id="linearGradient-1">
<stop stop-color="#4285EB" offset="0%"></stop>
<stop stop-color="#2EC7FF" offset="100%"></stop>
</linearGradient>
<linearGradient x1="69.644116%" y1="0%" x2="54.0428975%" y2="108.456714%" id="linearGradient-2">
<stop stop-color="#29CDFF" offset="0%"></stop>
<stop stop-color="#148EFF" offset="37.8600687%"></stop>
<stop stop-color="#0A60FF" offset="100%"></stop>
</linearGradient>
<linearGradient x1="69.6908165%" y1="-12.9743587%" x2="16.7228981%" y2="117.391248%" id="linearGradient-3">
<stop stop-color="#FA816E" offset="0%"></stop>
<stop stop-color="#F74A5C" offset="41.472606%"></stop>
<stop stop-color="#F51D2C" offset="100%"></stop>
</linearGradient>
<linearGradient x1="68.1279872%" y1="-35.6905737%" x2="30.4400914%" y2="114.942679%" id="linearGradient-4">
<stop stop-color="#FA8E7D" offset="0%"></stop>
<stop stop-color="#F74A5C" offset="51.2635191%"></stop>
<stop stop-color="#F51D2C" offset="100%"></stop>
</linearGradient>
</defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="logo" transform="translate(-20.000000, -20.000000)">
<g id="Group-28-Copy-5" transform="translate(20.000000, 20.000000)">
<g id="Group-27-Copy-3">
<g id="Group-25" fill-rule="nonzero">
<g id="2">
<path d="M91.5880863,4.17652823 L4.17996544,91.5127728 C-0.519240605,96.2081146 -0.519240605,103.791885 4.17996544,108.487227 L91.5880863,195.823472 C96.2872923,200.518814 103.877304,200.518814 108.57651,195.823472 L145.225487,159.204632 C149.433969,154.999611 149.433969,148.181924 145.225487,143.976903 C141.017005,139.771881 134.193707,139.771881 129.985225,143.976903 L102.20193,171.737352 C101.032305,172.906015 99.2571609,172.906015 98.0875359,171.737352 L28.285908,101.993122 C27.1162831,100.824459 27.1162831,99.050775 28.285908,97.8821118 L98.0875359,28.1378823 C99.2571609,26.9692191 101.032305,26.9692191 102.20193,28.1378823 L129.985225,55.8983314 C134.193707,60.1033528 141.017005,60.1033528 145.225487,55.8983314 C149.433969,51.69331 149.433969,44.8756232 145.225487,40.6706018 L108.58055,4.05574592 C103.862049,-0.537986846 96.2692618,-0.500797906 91.5880863,4.17652823 Z" id="Shape" fill="url(#linearGradient-1)"></path>
<path d="M91.5880863,4.17652823 L4.17996544,91.5127728 C-0.519240605,96.2081146 -0.519240605,103.791885 4.17996544,108.487227 L91.5880863,195.823472 C96.2872923,200.518814 103.877304,200.518814 108.57651,195.823472 L145.225487,159.204632 C149.433969,154.999611 149.433969,148.181924 145.225487,143.976903 C141.017005,139.771881 134.193707,139.771881 129.985225,143.976903 L102.20193,171.737352 C101.032305,172.906015 99.2571609,172.906015 98.0875359,171.737352 L28.285908,101.993122 C27.1162831,100.824459 27.1162831,99.050775 28.285908,97.8821118 L98.0875359,28.1378823 C100.999864,25.6271836 105.751642,20.541824 112.729652,19.3524487 C117.915585,18.4685261 123.585219,20.4140239 129.738554,25.1889424 C125.624663,21.0784292 118.571995,14.0340304 108.58055,4.05574592 C103.862049,-0.537986846 96.2692618,-0.500797906 91.5880863,4.17652823 Z" id="Shape" fill="url(#linearGradient-2)"></path>
</g>
<path d="M153.685633,135.854579 C157.894115,140.0596 164.717412,140.0596 168.925894,135.854579 L195.959977,108.842726 C200.659183,104.147384 200.659183,96.5636133 195.960527,91.8688194 L168.690777,64.7181159 C164.472332,60.5180858 157.646868,60.5241425 153.435895,64.7316526 C149.227413,68.936674 149.227413,75.7543607 153.435895,79.9593821 L171.854035,98.3623765 C173.02366,99.5310396 173.02366,101.304724 171.854035,102.473387 L153.685633,120.626849 C149.47715,124.83187 149.47715,131.649557 153.685633,135.854579 Z" id="Shape" fill="url(#linearGradient-3)"></path>
</g>
<ellipse id="Combined-Shape" fill="url(#linearGradient-4)" cx="100.519339" cy="100.436681" rx="23.6001926" ry="23.580786"></ellipse>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.6 KiB

49
samples/BookStore/src/BookStore.Blazor/wwwroot/main.css

@ -1,49 +0,0 @@
/* Global styles for the BookStore application */
.spinner {
width: 40px;
height: 40px;
display: block;
position: fixed;
top: calc( 50% - ( 40px / 2) );
right: calc( 50% - ( 40px / 2) );
}
.double-bounce1, .double-bounce2 {
width: 100%;
height: 100%;
border-radius: 50%;
background-color: #333;
opacity: 0.6;
position: absolute;
top: 0;
left: 0;
-webkit-animation: sk-bounce 2.0s infinite ease-in-out;
animation: sk-bounce 2.0s infinite ease-in-out;
}
.double-bounce2 {
-webkit-animation-delay: -1.0s;
animation-delay: -1.0s;
}
@-webkit-keyframes sk-bounce {
0%, 100% {
-webkit-transform: scale(0.0)
}
50% {
-webkit-transform: scale(1.0)
}
}
@keyframes sk-bounce {
0%, 100% {
transform: scale(0.0);
-webkit-transform: scale(0.0);
}
50% {
transform: scale(1.0);
-webkit-transform: scale(1.0);
}
}

55
samples/BookStore/src/BookStore.BlazorServer/BookStore.BlazorServer.csproj

@ -1,55 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>BookStore-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="Serilog.AspNetCore" />
<PackageReference Include="Serilog.Sinks.Async" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\modules\IdentityManagement\Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI\Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI.csproj" />
<ProjectReference Include="..\..\..\..\modules\AntDesignTheme\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme\Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.csproj" />
<ProjectReference Include="..\..\..\..\modules\SettingManagement\Lsw.Abp.SettingManagement.Blazor.Server.AntDesignUI\Lsw.Abp.SettingManagement.Blazor.Server.AntDesignUI.csproj" />
<ProjectReference Include="..\..\..\..\modules\TenantManagement\Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI\Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI.csproj" />
<ProjectReference Include="..\..\src\BookStore.Application\BookStore.Application.csproj" />
<ProjectReference Include="..\..\src\BookStore.HttpApi\BookStore.HttpApi.csproj" />
<ProjectReference Include="..\..\src\BookStore.EntityFrameworkCore\BookStore.EntityFrameworkCore.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" />
<PackageReference Include="Volo.Abp.Autofac" />
<PackageReference Include="Volo.Abp.Swashbuckle" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<None Update="Pages\**\*.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Pages\**\*.css">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

245
samples/BookStore/src/BookStore.BlazorServer/BookStoreBlazorModule.cs

@ -1,245 +0,0 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.OpenApi.Models;
using BookStore.Blazor.Menus;
using BookStore.EntityFrameworkCore;
using BookStore.Localization;
using BookStore.MultiTenancy;
using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing;
using Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI;
using Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI;
using Volo.Abp;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Lsw.Abp.SettingManagement.Blazor.AntDesignUI;
using Lsw.Abp.SettingManagement.Blazor.Server.AntDesignUI;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling;
using Volo.Abp.Swashbuckle;
using Volo.Abp.UI.Navigation;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.VirtualFileSystem;
using Volo.Abp.Timing;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme;
namespace BookStore.Blazor;
[DependsOn(
typeof(BookStoreApplicationModule),
typeof(BookStoreEntityFrameworkCoreModule),
typeof(BookStoreHttpApiModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAutofacModule),
typeof(AbpSwashbuckleModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAccountWebIdentityServerModule),
typeof(AbpIdentityBlazorServerAntDesignModule),
typeof(AbpTenantManagementBlazorServerAntDesignModule),
typeof(AbpSettingManagementBlazorServerAntDesignModule)
)]
public class BookStoreBlazorModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(
typeof(BookStoreResource),
typeof(BookStoreDomainModule).Assembly,
typeof(BookStoreDomainSharedModule).Assembly,
typeof(BookStoreApplicationModule).Assembly,
typeof(BookStoreApplicationContractsModule).Assembly,
typeof(BookStoreBlazorModule).Assembly
);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
Configure<AbpClockOptions>(options => options.Kind = DateTimeKind.Utc);
Configure<AbpAntDesignThemeOptions>(options=> options.EnableMultipleTabs=true);
ConfigureUrls(configuration);
ConfigureBundles();
ConfigureAuthentication(context, configuration);
ConfigureAutoMapper();
ConfigureLocalizationServices();
ConfigureSwaggerServices(context.Services);
ConfigureAutoApiControllers();
ConfigureRouter(context);
ConfigureMenu(context);
}
private void ConfigureUrls(IConfiguration configuration)
{
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"].Split(','));
});
}
private void ConfigureBundles()
{
Configure<AbpBundlingOptions>(options =>
{
// MVC UI
options.StyleBundles.Configure(
BasicThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/global-styles.css");
}
);
//BLAZOR UI
options.StyleBundles.Configure(
BlazorAntDesignThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/blazor-global-styles.css");
//You can remove the following line if you don't use Blazor CSS isolation for components
bundle.AddFiles("/BookStore.BlazorServer.styles.css");
}
);
});
}
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAuthentication()
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.Audience = "BookStore";
});
}
private void ConfigureLocalizationServices()
{
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("ar", "ar", "العربية"));
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
options.Languages.Add(new LanguageInfo("en", "en", "English"));
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish"));
options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi"));
options.Languages.Add(new LanguageInfo("is", "is", "Icelandic"));
options.Languages.Add(new LanguageInfo("it", "it", "Italiano"));
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
options.Languages.Add(new LanguageInfo("ro-RO", "ro-RO", "Română"));
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch"));
options.Languages.Add(new LanguageInfo("es", "es", "Español"));
});
}
private void ConfigureSwaggerServices(IServiceCollection services)
{
services.AddAbpSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BookStore API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
}
);
}
private void ConfigureMenu(ServiceConfigurationContext context)
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new BookStoreMenuContributor());
});
}
private void ConfigureRouter(ServiceConfigurationContext context)
{
Configure<AbpRouterOptions>(options =>
{
options.AppAssembly = typeof(BookStoreBlazorModule).Assembly;
});
}
private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(BookStoreApplicationModule).Assembly);
});
}
private void ConfigureAutoMapper()
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BookStoreBlazorModule>();
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var env = context.GetEnvironment();
var app = context.GetApplicationBuilder();
app.UseAbpRequestLocalization();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseCorrelationId();
app.MapAbpStaticAssets();
app.UseRouting();
app.UseAuthentication();
app.UseJwtTokenMiddleware();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseIdentityServer();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "BookStore API");
});
app.UseConfiguredEndpoints();
}
}

10
samples/BookStore/src/BookStore.BlazorServer/BookStoreBrandingProvider.cs

@ -1,10 +0,0 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Ui.Branding;
namespace BookStore.Blazor;
[Dependency(ReplaceServices = true)]
public class BookStoreBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "BookStore";
}

52
samples/BookStore/src/BookStore.BlazorServer/Menus/BookStoreMenuContributor.cs

@ -1,52 +0,0 @@
using System.Threading.Tasks;
using AntDesign;
using BookStore.Localization;
using BookStore.MultiTenancy;
using Lsw.Abp.IdentityManagement.Blazor.AntDesignUI;
using Lsw.Abp.TenantManagement.Blazor.AntDesignUI;
using Lsw.Abp.SettingManagement.Blazor.AntDesignUI;
using Volo.Abp.UI.Navigation;
namespace BookStore.Blazor.Menus;
public class BookStoreMenuContributor : IMenuContributor
{
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
}
private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
var administration = context.Menu.GetAdministration();
var l = context.GetLocalizer<BookStoreResource>();
context.Menu.Items.Insert(
0,
new ApplicationMenuItem(
BookStoreMenus.Home,
l["Menu:Home"],
"/",
icon: IconType.Outline.Home,
order: 0
)
);
if (MultiTenancyConsts.IsEnabled)
{
administration.SetSubItemOrder(TenantManagementMenuNames.GroupName, 1);
}
else
{
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName);
}
administration.SetSubItemOrder(IdentityMenuNames.GroupName, 2);
administration.SetSubItemOrder(SettingManagementMenus.GroupName, 3);
return Task.CompletedTask;
}
}

24
samples/BookStore/src/BookStore.BlazorServer/Pages/Index.razor

@ -1,24 +0,0 @@
@page "/"
@using Volo.Abp.MultiTenancy
@inherits BookStoreComponentBase
@inject ICurrentTenant CurrentTenant
@inject AuthenticationStateProvider AuthenticationStateProvider
<div class="page-content">
<div style="text-align: center">
<Alert Type="@AlertType.Success"
Message="Success"
Description=" Congratulations, BookStore is successfully running!"
ShowIcon="true"/>
<Divider/>
<p>@L["LongWelcomeMessage"]</p>
@if (!CurrentUser.IsAuthenticated)
{
<a class="btn btn-primary" href="Account/Login" ><i class="fa fa-sign-in"></i> @L["Login"]</a>
}
</div>
</div>

15
samples/BookStore/src/BookStore.BlazorServer/Pages/Index.razor.cs

@ -1,15 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using AntDesign;
using AntDesign.TableModels;
namespace BookStore.BlazorServer.Pages;
public partial class Index
{
}

1
samples/BookStore/src/BookStore.BlazorServer/Pages/Index.razor.css

@ -1 +0,0 @@
/* Write here your styles for the Index page */

40
samples/BookStore/src/BookStore.BlazorServer/Pages/_Host.cshtml

@ -1,40 +0,0 @@
@page "/"
@namespace BookStore.Blazor.Pages
@using System.Globalization
@using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Themes.AntDesignTheme
@using Microsoft.AspNetCore.Mvc.TagHelpers
@using Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
@using Volo.Abp.Localization
@{
Layout = null;
var rtl = CultureHelper.IsRtl ? "rtl" : string.Empty;
}
<!DOCTYPE html>
<html lang="@CultureInfo.CurrentCulture.Name" dir="@rtl">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BookStore.Blazor</title>
<base href="~/" />
<abp-style-bundle name="@BlazorAntDesignThemeBundles.Styles.Global" />
</head>
<body class="abp-application-layout bg-light @rtl">
<component type="typeof(App)" render-mode="Server" />
<div id="blazor-error-ui">
<environment include="Staging,Production">
An error has occurred. This application may no longer respond until reloaded.
</environment>
<environment include="Development">
An unhandled exception has occurred. See browser dev tools for details.
</environment>
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<abp-script-bundle name="@BlazorAntDesignThemeBundles.Scripts.Global" />
</body>
</html>

4
samples/BookStore/src/BookStore.BlazorServer/Pages/_ViewImports.cshtml

@ -1,4 +0,0 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

12
samples/BookStore/src/BookStore.BlazorServer/_Imports.razor

@ -1,12 +0,0 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using BookStore.Blazor
@using AntDesign
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components

16
samples/BookStore/src/BookStore.BlazorServer/appsettings.json

@ -1,16 +0,0 @@
{
"App": {
"SelfUrl": "https://localhost:44313",
"RedirectAllowedUrls": "https://localhost:44313"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=AntBlazorDemo;Trusted_Connection=True"
},
"AuthServer": {
"Authority": "https://localhost:44313",
"RequireHttpsMetadata": "false"
},
"StringEncryption": {
"DefaultPassPhrase": "PkQhKQMtlOiqySK3"
}
}

424
samples/BookStore/src/BookStore.BlazorServer/package-lock.json

@ -1,424 +0,0 @@
{
"name": "my-app",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "my-app",
"version": "1.0.0",
"dependencies": {
"@abp/aspnetcore.components.server.basictheme": "~9.0.0",
"@abp/aspnetcore.mvc.ui.theme.basic": "~9.0.0"
}
},
"node_modules/@abp/aspnetcore.components.server.basictheme": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/aspnetcore.components.server.basictheme/-/aspnetcore.components.server.basictheme-9.0.1.tgz",
"integrity": "sha512-9nRzZuHteVxUKwDdbKeOiU4j01S9lknZg+FpVeDGYnhJwLi6ssdyDvAi6uL8F+sWKhAh8JcmwfmPBqwzuwq9CQ==",
"dependencies": {
"@abp/aspnetcore.components.server.theming": "~9.0.1"
}
},
"node_modules/@abp/aspnetcore.components.server.theming": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/aspnetcore.components.server.theming/-/aspnetcore.components.server.theming-9.0.1.tgz",
"integrity": "sha512-PEvkCxlL+pYS6wdzIznghN+t0tIpr8ipuVK0zTFK4yFIFWDw+LzOPADGv1UcmlO7nxC6DGUxye5JatjX61Cocg==",
"dependencies": {
"@abp/bootstrap": "~9.0.1",
"@abp/font-awesome": "~9.0.1"
}
},
"node_modules/@abp/aspnetcore.mvc.ui": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.0.1.tgz",
"integrity": "sha512-KVbWCpBV7S1ViHYQP/hn4gSMzSiA2e8/zC0HND1fjE+1zXJqJyEWto1eg2DaKSOs/rmHD8WtFVMU4hCLQTCuIA==",
"dependencies": {
"ansi-colors": "^4.1.3"
}
},
"node_modules/@abp/aspnetcore.mvc.ui.theme.basic": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.0.1.tgz",
"integrity": "sha512-JaxuDH8WTnZYX6C7CX7ZVHfhTDR/SxfwRvtJaGGijSX8QKd1DXpfi9lYEF4Y9k5b48YT/0slBqU5g0sLmBd3+g==",
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.shared": "~9.0.1"
}
},
"node_modules/@abp/aspnetcore.mvc.ui.theme.shared": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.0.1.tgz",
"integrity": "sha512-vrgRYKNctdZYhPCQ2I6Z10gUI1S5ynDj+DgnV7x7a7G/juuHaOSbkRXgwrmJsmYLfGA7KFCoJcbpER8mmXQeHQ==",
"dependencies": {
"@abp/aspnetcore.mvc.ui": "~9.0.1",
"@abp/bootstrap": "~9.0.1",
"@abp/bootstrap-datepicker": "~9.0.1",
"@abp/bootstrap-daterangepicker": "~9.0.1",
"@abp/datatables.net-bs5": "~9.0.1",
"@abp/font-awesome": "~9.0.1",
"@abp/jquery-form": "~9.0.1",
"@abp/jquery-validation-unobtrusive": "~9.0.1",
"@abp/lodash": "~9.0.1",
"@abp/luxon": "~9.0.1",
"@abp/malihu-custom-scrollbar-plugin": "~9.0.1",
"@abp/moment": "~9.0.1",
"@abp/select2": "~9.0.1",
"@abp/sweetalert2": "~9.0.1",
"@abp/timeago": "~9.0.1",
"@abp/toastr": "~9.0.1"
}
},
"node_modules/@abp/bootstrap": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/bootstrap/-/bootstrap-9.0.1.tgz",
"integrity": "sha512-uAfVNsUYSsRqgeO9JMnhJJlFoDmO3/lTvER/iYOqerF0X03KQnR8HZy2V3MD1D+fSh/4JuU6aAZFl6IQLinMKQ==",
"dependencies": {
"@abp/core": "~9.0.1",
"bootstrap": "^5.3.3"
}
},
"node_modules/@abp/bootstrap-datepicker": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.0.1.tgz",
"integrity": "sha512-LhgqBRr66x9gGTAyv1FuPAw8u8N77WQK2AfDkNgLueurM2+xMYQzH3pWWLhcN676/JXafxfALCfBoM8U7CfXLg==",
"dependencies": {
"bootstrap-datepicker": "^1.10.0"
}
},
"node_modules/@abp/bootstrap-daterangepicker": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.0.1.tgz",
"integrity": "sha512-SlBVgiYa75uQyaGt5EVjduren7Po5UP26A1tXEQQr0hDia1+1TK0qxmJ2YxjeJpB7FwtcmJiofv5fngvJqhxIA==",
"dependencies": {
"bootstrap-daterangepicker": "^3.1.0"
}
},
"node_modules/@abp/core": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/core/-/core-9.0.1.tgz",
"integrity": "sha512-NWXDVCIJePbcKCrRvGxAlaA2MrOF2IZox37bQkW7/mTeOPpNoTa6lhowksNNcTpFq2YdD8bG0i0kfskkp3EZ2w==",
"dependencies": {
"@abp/utils": "~9.0.1"
}
},
"node_modules/@abp/datatables.net": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/datatables.net/-/datatables.net-9.0.1.tgz",
"integrity": "sha512-JY53zVQPluRrBiKwtgk4gfSgD8VDs/VU8LWizhGCprXt3h9vXx0SQL4My6zvXVkv4hUjaq4+MYo84OI8EwFvsg==",
"dependencies": {
"@abp/jquery": "~9.0.1",
"datatables.net": "^2.1.8"
}
},
"node_modules/@abp/datatables.net-bs5": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/datatables.net-bs5/-/datatables.net-bs5-9.0.1.tgz",
"integrity": "sha512-tAHdf4TBAS0bVRcvovDKS0OHFyeRSPYbiSIwDn8AIWzW9Weav31jhZ5jL3HEtBKVdb7zqUQ8/3dYPufjDuDdDA==",
"dependencies": {
"@abp/datatables.net": "~9.0.1",
"datatables.net-bs5": "^2.1.8"
}
},
"node_modules/@abp/font-awesome": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/font-awesome/-/font-awesome-9.0.1.tgz",
"integrity": "sha512-7NnYBmk0plLVElUWR1zohul87vE9wKJItemWT5Kskf/IJirKOvXwSSu+7Jg1LmnVtIxcH6qgRpJMmzuAJgawnQ==",
"dependencies": {
"@abp/core": "~9.0.1",
"@fortawesome/fontawesome-free": "^6.6.0"
}
},
"node_modules/@abp/jquery": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/jquery/-/jquery-9.0.1.tgz",
"integrity": "sha512-z8EcnOveItAszbTsM9GFFDQSlcIg/ym6+WZME9uldLoetdxkmI9ij0knVeGj5eqMjQaHvTWwrVLObiBbZwYFWw==",
"dependencies": {
"@abp/core": "~9.0.1",
"jquery": "~3.7.1"
}
},
"node_modules/@abp/jquery-form": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/jquery-form/-/jquery-form-9.0.1.tgz",
"integrity": "sha512-9co0+Cver+RUSOpfuukSWQhR+TCnO9Dly4RTVRIKFksGVfN8hA70NqRrVxaASNNFv42ynK88FQK+2bLPswz/iw==",
"dependencies": {
"@abp/jquery": "~9.0.1",
"jquery-form": "^4.3.0"
}
},
"node_modules/@abp/jquery-validation": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/jquery-validation/-/jquery-validation-9.0.1.tgz",
"integrity": "sha512-uFSxiPMEkaPlcuyXIoKbeOIIRHo4IrgRbmnlHwI1uETrW60ENUdE2LJAVcYS77JROrjVtv8FPlaffWuva6sGeQ==",
"dependencies": {
"@abp/jquery": "~9.0.1",
"jquery-validation": "^1.21.0"
}
},
"node_modules/@abp/jquery-validation-unobtrusive": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.0.1.tgz",
"integrity": "sha512-Zpz48wIFjq7eIApG/sEVjkfaJWZhcyCnlCtDf5eU3vvh82nRetbiCEAVLpZ4LVjorlyp3VvVAxReUSeeWflu8A==",
"dependencies": {
"@abp/jquery-validation": "~9.0.1",
"jquery-validation-unobtrusive": "^4.0.0"
}
},
"node_modules/@abp/lodash": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/lodash/-/lodash-9.0.1.tgz",
"integrity": "sha512-D+/iOyh/O+jV80bK5vWxyn++IVmeRbZq/UaXanA4RKpzigxJUsgOiSD9lUj85BkfKn2YyFmoR39xwaAqkWoyRA==",
"dependencies": {
"@abp/core": "~9.0.1",
"lodash": "^4.17.21"
}
},
"node_modules/@abp/luxon": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/luxon/-/luxon-9.0.1.tgz",
"integrity": "sha512-1ZHXP5SGz05tQ1tzYmPcRiZwmkCKGX0KWFoV0zF3ATRaevzku9nXvSy7K6GIFkkgTb9f9XNx4/OBBF/GXkuRqw==",
"dependencies": {
"@abp/core": "~9.0.1",
"luxon": "^3.5.0"
}
},
"node_modules/@abp/malihu-custom-scrollbar-plugin": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.0.1.tgz",
"integrity": "sha512-GkKPLg9Z9UTTSSpW2hYZYZ9IgCvDSOYJmyRSl/h4fG8cWMgGCPVpv8MPPu0+WtIfwW/mT4SPX9X+sjUlRL5XRQ==",
"dependencies": {
"@abp/core": "~9.0.1",
"malihu-custom-scrollbar-plugin": "^3.1.5"
}
},
"node_modules/@abp/moment": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/moment/-/moment-9.0.1.tgz",
"integrity": "sha512-bTuCc7pi/DCtgz7t96UBU0wn9UGt4b50JhDCVeTKquh+gP1sgWoI5hyvEBkmgE4dcffO0yzZU2opHYTKYGl/OQ==",
"dependencies": {
"moment": "^2.30.1"
}
},
"node_modules/@abp/select2": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/select2/-/select2-9.0.1.tgz",
"integrity": "sha512-epyYJH2gAOU2UvGn5FD6372hbW3fL7uZIgGpvfgEfa+l6HPdlV9B1OweU2xkONNCoylShAcP/y8qf+bUh8WDEA==",
"dependencies": {
"@abp/core": "~9.0.1",
"select2": "^4.0.13"
}
},
"node_modules/@abp/sweetalert2": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/sweetalert2/-/sweetalert2-9.0.1.tgz",
"integrity": "sha512-0RXR/lzy3qMJLisGUz4qrcA9Clu/Tt1ABGzB64ynG1t/l5XessQsIB5Hkt6MbSyOEsprRsq+ZtKH35CwTRPdAw==",
"dependencies": {
"@abp/core": "~9.0.1",
"sweetalert2": "^11.14.1"
}
},
"node_modules/@abp/timeago": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/timeago/-/timeago-9.0.1.tgz",
"integrity": "sha512-dNfUQwilrY+JHxL5lwJ++ixYDGAs5lF1EDxKMQMIXD/ak5L8rkdLns8Otta7FhgDDny9UJ7XWQjYsG8ZxxybRQ==",
"dependencies": {
"@abp/jquery": "~9.0.1",
"timeago": "^1.6.7"
}
},
"node_modules/@abp/toastr": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/toastr/-/toastr-9.0.1.tgz",
"integrity": "sha512-10KuHnSJOxkvzqs6Aim6GJp8xBuT+TsZqBE1KaXQnERPawmOo4+ME28kA/7lq8fvgFUNO3K41T2uuA1GPHVQcg==",
"dependencies": {
"@abp/jquery": "~9.0.1",
"toastr": "^2.1.4"
}
},
"node_modules/@abp/utils": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/@abp/utils/-/utils-9.0.1.tgz",
"integrity": "sha512-7eOKT0ciKNdtuASck1kifyc4dC6CeebgxV+rx/EAi3YwPMDkqie6YwLGUqKdGW2N/MZ15JuDR6gkuZxKHEb0NQ==",
"dependencies": {
"just-compare": "^2.3.0"
}
},
"node_modules/@fortawesome/fontawesome-free": {
"version": "6.7.1",
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.1.tgz",
"integrity": "sha512-ALIk/MOh5gYe1TG/ieS5mVUsk7VUIJTJKPMK9rFFqOgfp0Q3d5QiBXbcOMwUvs37fyZVCz46YjOE6IFeOAXCHA==",
"engines": {
"node": ">=6"
}
},
"node_modules/@popperjs/core": {
"version": "2.11.8",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
"integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
"peer": true,
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/popperjs"
}
},
"node_modules/ansi-colors": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz",
"integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==",
"engines": {
"node": ">=6"
}
},
"node_modules/bootstrap": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz",
"integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/twbs"
},
{
"type": "opencollective",
"url": "https://opencollective.com/bootstrap"
}
],
"peerDependencies": {
"@popperjs/core": "^2.11.8"
}
},
"node_modules/bootstrap-datepicker": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/bootstrap-datepicker/-/bootstrap-datepicker-1.10.0.tgz",
"integrity": "sha512-lWxtSYddAQOpbAO8UhYhHLcK6425eWoSjb5JDvZU3ePHEPF6A3eUr51WKaFy4PccU19JRxUG6wEU3KdhtKfvpg==",
"dependencies": {
"jquery": ">=3.4.0 <4.0.0"
}
},
"node_modules/bootstrap-daterangepicker": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz",
"integrity": "sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g==",
"dependencies": {
"jquery": ">=1.10",
"moment": "^2.9.0"
}
},
"node_modules/datatables.net": {
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/datatables.net/-/datatables.net-2.1.8.tgz",
"integrity": "sha512-47ULt+U4bcjbuGTpTlT6SnCuSFVRBxxdWa6X3NfvTObBJ2BZU0o+JUIl05wQ6cABNIavjbAV51gpgvFsMHL9zA==",
"dependencies": {
"jquery": ">=1.7"
}
},
"node_modules/datatables.net-bs5": {
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/datatables.net-bs5/-/datatables.net-bs5-2.1.8.tgz",
"integrity": "sha512-YlGws8eI3iw/1AmKJH18+YMzm/UgGb6o9s14KAC24QT1/8anolm8GnVAgGcwUcvHm3hn1i8A5QXqgbqeMRINeg==",
"dependencies": {
"datatables.net": "2.1.8",
"jquery": ">=1.7"
}
},
"node_modules/jquery": {
"version": "3.7.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
},
"node_modules/jquery-form": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/jquery-form/-/jquery-form-4.3.0.tgz",
"integrity": "sha512-q3uaVCEWdLOYUCI6dpNdwf/7cJFOsUgdpq6r0taxtGQ5NJSkOzofyWm4jpOuJ5YxdmL1FI5QR+q+HB63HHLGnQ==",
"dependencies": {
"jquery": ">=1.7.2"
}
},
"node_modules/jquery-mousewheel": {
"version": "3.1.13",
"resolved": "https://registry.npmjs.org/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz",
"integrity": "sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg=="
},
"node_modules/jquery-validation": {
"version": "1.21.0",
"resolved": "https://registry.npmjs.org/jquery-validation/-/jquery-validation-1.21.0.tgz",
"integrity": "sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w==",
"peerDependencies": {
"jquery": "^1.7 || ^2.0 || ^3.1"
}
},
"node_modules/jquery-validation-unobtrusive": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.0.0.tgz",
"integrity": "sha512-1ervYFFv6LX/rp7ktuLnMakHNG0piNRDyROI8Ir3hL1vPIwylAehB1AY3BPrYJnzW3WmwWryZq+Bz4sazZK9iQ==",
"dependencies": {
"jquery": "^3.6.0",
"jquery-validation": ">=1.19"
}
},
"node_modules/just-compare": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/just-compare/-/just-compare-2.3.0.tgz",
"integrity": "sha512-6shoR7HDT+fzfL3gBahx1jZG3hWLrhPAf+l7nCwahDdT9XDtosB9kIF0ZrzUp5QY8dJWfQVr5rnsPqsbvflDzg=="
},
"node_modules/lodash": {
"version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"node_modules/luxon": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz",
"integrity": "sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==",
"engines": {
"node": ">=12"
}
},
"node_modules/malihu-custom-scrollbar-plugin": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz",
"integrity": "sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ==",
"dependencies": {
"jquery-mousewheel": ">=3.0.6"
}
},
"node_modules/moment": {
"version": "2.30.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
"engines": {
"node": "*"
}
},
"node_modules/select2": {
"version": "4.0.13",
"resolved": "https://registry.npmjs.org/select2/-/select2-4.0.13.tgz",
"integrity": "sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw=="
},
"node_modules/sweetalert2": {
"version": "11.14.5",
"resolved": "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.14.5.tgz",
"integrity": "sha512-8MWk5uc/r6bWhiJWkUXyEuApfXAhSCZT8FFX7pZXL7YwaPxq+9Ynhi2dUzWkOFn9jvLjKj22CXuccZ+IHcnjvQ==",
"funding": {
"type": "individual",
"url": "https://github.com/sponsors/limonte"
}
},
"node_modules/timeago": {
"version": "1.6.7",
"resolved": "https://registry.npmjs.org/timeago/-/timeago-1.6.7.tgz",
"integrity": "sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ==",
"dependencies": {
"jquery": ">=1.5.0 <4.0"
}
},
"node_modules/toastr": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/toastr/-/toastr-2.1.4.tgz",
"integrity": "sha512-LIy77F5n+sz4tefMmFOntcJ6HL0Fv3k1TDnNmFZ0bU/GcvIIfy6eG2v7zQmMiYgaalAiUv75ttFrPn5s0gyqlA==",
"dependencies": {
"jquery": ">=1.12.0"
}
}
}
}

9
samples/BookStore/src/BookStore.BlazorServer/package.json

@ -1,9 +0,0 @@
{
"version": "1.0.0",
"name": "my-app",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "~9.0.0",
"@abp/aspnetcore.components.server.basictheme": "~9.0.0"
}
}

1
samples/BookStore/src/BookStore.BlazorServer/tempkey.jwk

@ -1 +0,0 @@
{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"EJxSLqek1F97IN_FQrqH6tHTXj96D1sWsdrAG09HT4GPrg_FJUYhSOL5LDRaSTg8j_o72Id9NnBWMlCFtEEhRqqTm8JcnkSYFFcOCWDCmwhkcgQuQi9JXDWFDgEcyDTvvn-XT2eszrUifnXfaLArM6LiHApEMv_Q3rUFhuHfPM-fBn5-r_oyvY8ISU-dHzD7c8EHCvfG8U8GsyEDUKBVjxyDLZa6awoq5jG0TlXgAH73zYrIdhNlSDVAaxH6fYRbLMe0sDBmM5PEuWAh5XKsaeOyeXi2VcB-5vGzBkw0GbtPdtCE0t9IE6BBMjJZcn3qS-D65b3zKM1KsD-B64yArQ","DP":"Hp93c--dv_2o00kZnlGDloIGgo3t6VEHf1vxOHBXNEW6TxIV91zvVk7O9nWG5Gf9FRCGkT6B-dKuUXkTvS6iLrcONxdvTtZVTgb8tb5-gZRiWhnfPg3gE-fM-Kg5zWtDfXA1TZOIrAc4nQxws5Fv0_l9R5Yx6EVqhADZwkHaNk8","DQ":"cmc0f_Hn8zMzHZOpg8lcdAPd8E-o3oAGPUI86ksDDQgjdJEMDedm_L5ozmlM_rl1wX93xCPn_5dlIQCkQ7ggKYigwSzdmubz_xqicpbuzWZKMy0n-uovFOcY9e-RBR9bmEY8_l_X7xQ0Mt2wTsbtxhJUKIRjEDH5U26rNIptvs8","E":"AQAB","K":null,"KeyId":"E69CCEFDB17CF66EB573EDE9F6C97D25","Kid":"E69CCEFDB17CF66EB573EDE9F6C97D25","Kty":"RSA","N":"wXZHBDkeQUD9VPrdffdLWwYPMts1Z0e_cKpsGURoOBbkdVoW4s4Gx41ySpcQxKcjc0ZfZGCHTHTcIlX8fJpjcVI4yv8-Zvb2WiGu8p2AshzR7qZAQWapTyfdlYypHoOo_Ovtkwn5GiguYuw0Kad2O4LgmuHBusHkuhHA8IzES9cl8biO1vuF2C7OZ7QGNOQURcJ0DCRMuhNhw4duek4Qv20X3q4FP-GEj3TBPU8WrRaXWdvvnE5uYbKHlktzO8i90N-4LcaafjF5ybJKfhO_yJLg4VrOMp6d8N0Vvp82KKpuPOdxw9PtlzTClGhEEwhB_OV65uHJtQ0OTo-6dlZBaQ","Oth":null,"P":"4qTn9VWJSITHggHRjan14c56MPySufpMn5F2zZjHusIP7HfVfG0-OMisdQrwLyYs9PlPpBi5f15Wj8guNL41_EcHx_Y9acWpzNZcl3dvc3bZEmwa8TOM_SJmTC8jDs3PKXo5lTrW5-oplKhseKzdm9XTzGiyvIhr0X55r60ZW-M","Q":"2oUdKMsP8BYh1a-i8LQk5fSZV9oqcLcK9IGDHnagq0W-Phh2WygM-8eqM-aRY3A2R5dvCqUG7Xv8z0EnIvGL_cR97ZVAYXJsdLZVJBmWVmS81oxl3D9QvtAqW3Z_dO09kwGNzdKMg_lefRujL8SkoW4159_p8vsFE52IRbMQB0M","QI":"xD4LuaygDVMFans9eqP38Vonv7bpWe5oDVJaPzFTscbiwURTERzv7WhIZKZdPCG01MRiwwXCcMWqCrGZpTmcqwZVaeREcEd11qmVfQYvZKj_-8s8kmIQzXipPlTUFEaoGLJ0ipUoymmkGDTGXurkwR_dTX_d43PwQq6eMWKpBP8","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true,"SignatureProviderObjectPoolCacheSize":64}}

BIN
samples/BookStore/src/BookStore.BlazorServer/wwwroot/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

3
samples/BookStore/src/BookStore.BlazorServer/wwwroot/global-styles.css

@ -1,3 +0,0 @@
body {
}

335
samples/BookStore/src/BookStore.BlazorServer/yarn.lock

@ -1,335 +0,0 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@abp/aspnetcore.components.server.basictheme@~9.0.0":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/aspnetcore.components.server.basictheme/-/aspnetcore.components.server.basictheme-9.0.1.tgz"
integrity sha512-9nRzZuHteVxUKwDdbKeOiU4j01S9lknZg+FpVeDGYnhJwLi6ssdyDvAi6uL8F+sWKhAh8JcmwfmPBqwzuwq9CQ==
dependencies:
"@abp/aspnetcore.components.server.theming" "~9.0.1"
"@abp/aspnetcore.components.server.theming@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/aspnetcore.components.server.theming/-/aspnetcore.components.server.theming-9.0.1.tgz"
integrity sha512-PEvkCxlL+pYS6wdzIznghN+t0tIpr8ipuVK0zTFK4yFIFWDw+LzOPADGv1UcmlO7nxC6DGUxye5JatjX61Cocg==
dependencies:
"@abp/bootstrap" "~9.0.1"
"@abp/font-awesome" "~9.0.1"
"@abp/aspnetcore.mvc.ui.theme.basic@~9.0.0":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/aspnetcore.mvc.ui.theme.basic/-/aspnetcore.mvc.ui.theme.basic-9.0.1.tgz"
integrity sha512-JaxuDH8WTnZYX6C7CX7ZVHfhTDR/SxfwRvtJaGGijSX8QKd1DXpfi9lYEF4Y9k5b48YT/0slBqU5g0sLmBd3+g==
dependencies:
"@abp/aspnetcore.mvc.ui.theme.shared" "~9.0.1"
"@abp/aspnetcore.mvc.ui.theme.shared@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-9.0.1.tgz"
integrity sha512-vrgRYKNctdZYhPCQ2I6Z10gUI1S5ynDj+DgnV7x7a7G/juuHaOSbkRXgwrmJsmYLfGA7KFCoJcbpER8mmXQeHQ==
dependencies:
"@abp/aspnetcore.mvc.ui" "~9.0.1"
"@abp/bootstrap" "~9.0.1"
"@abp/bootstrap-datepicker" "~9.0.1"
"@abp/bootstrap-daterangepicker" "~9.0.1"
"@abp/datatables.net-bs5" "~9.0.1"
"@abp/font-awesome" "~9.0.1"
"@abp/jquery-form" "~9.0.1"
"@abp/jquery-validation-unobtrusive" "~9.0.1"
"@abp/lodash" "~9.0.1"
"@abp/luxon" "~9.0.1"
"@abp/malihu-custom-scrollbar-plugin" "~9.0.1"
"@abp/moment" "~9.0.1"
"@abp/select2" "~9.0.1"
"@abp/sweetalert2" "~9.0.1"
"@abp/timeago" "~9.0.1"
"@abp/toastr" "~9.0.1"
"@abp/aspnetcore.mvc.ui@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-9.0.1.tgz"
integrity sha512-KVbWCpBV7S1ViHYQP/hn4gSMzSiA2e8/zC0HND1fjE+1zXJqJyEWto1eg2DaKSOs/rmHD8WtFVMU4hCLQTCuIA==
dependencies:
ansi-colors "^4.1.3"
"@abp/bootstrap-datepicker@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/bootstrap-datepicker/-/bootstrap-datepicker-9.0.1.tgz"
integrity sha512-LhgqBRr66x9gGTAyv1FuPAw8u8N77WQK2AfDkNgLueurM2+xMYQzH3pWWLhcN676/JXafxfALCfBoM8U7CfXLg==
dependencies:
bootstrap-datepicker "^1.10.0"
"@abp/bootstrap-daterangepicker@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-9.0.1.tgz"
integrity sha512-SlBVgiYa75uQyaGt5EVjduren7Po5UP26A1tXEQQr0hDia1+1TK0qxmJ2YxjeJpB7FwtcmJiofv5fngvJqhxIA==
dependencies:
bootstrap-daterangepicker "^3.1.0"
"@abp/bootstrap@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/bootstrap/-/bootstrap-9.0.1.tgz"
integrity sha512-uAfVNsUYSsRqgeO9JMnhJJlFoDmO3/lTvER/iYOqerF0X03KQnR8HZy2V3MD1D+fSh/4JuU6aAZFl6IQLinMKQ==
dependencies:
"@abp/core" "~9.0.1"
bootstrap "^5.3.3"
"@abp/core@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/core/-/core-9.0.1.tgz"
integrity sha512-NWXDVCIJePbcKCrRvGxAlaA2MrOF2IZox37bQkW7/mTeOPpNoTa6lhowksNNcTpFq2YdD8bG0i0kfskkp3EZ2w==
dependencies:
"@abp/utils" "~9.0.1"
"@abp/datatables.net-bs5@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/datatables.net-bs5/-/datatables.net-bs5-9.0.1.tgz"
integrity sha512-tAHdf4TBAS0bVRcvovDKS0OHFyeRSPYbiSIwDn8AIWzW9Weav31jhZ5jL3HEtBKVdb7zqUQ8/3dYPufjDuDdDA==
dependencies:
"@abp/datatables.net" "~9.0.1"
datatables.net-bs5 "^2.1.8"
"@abp/datatables.net@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/datatables.net/-/datatables.net-9.0.1.tgz"
integrity sha512-JY53zVQPluRrBiKwtgk4gfSgD8VDs/VU8LWizhGCprXt3h9vXx0SQL4My6zvXVkv4hUjaq4+MYo84OI8EwFvsg==
dependencies:
"@abp/jquery" "~9.0.1"
datatables.net "^2.1.8"
"@abp/font-awesome@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/font-awesome/-/font-awesome-9.0.1.tgz"
integrity sha512-7NnYBmk0plLVElUWR1zohul87vE9wKJItemWT5Kskf/IJirKOvXwSSu+7Jg1LmnVtIxcH6qgRpJMmzuAJgawnQ==
dependencies:
"@abp/core" "~9.0.1"
"@fortawesome/fontawesome-free" "^6.6.0"
"@abp/jquery-form@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/jquery-form/-/jquery-form-9.0.1.tgz"
integrity sha512-9co0+Cver+RUSOpfuukSWQhR+TCnO9Dly4RTVRIKFksGVfN8hA70NqRrVxaASNNFv42ynK88FQK+2bLPswz/iw==
dependencies:
"@abp/jquery" "~9.0.1"
jquery-form "^4.3.0"
"@abp/jquery-validation-unobtrusive@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-9.0.1.tgz"
integrity sha512-Zpz48wIFjq7eIApG/sEVjkfaJWZhcyCnlCtDf5eU3vvh82nRetbiCEAVLpZ4LVjorlyp3VvVAxReUSeeWflu8A==
dependencies:
"@abp/jquery-validation" "~9.0.1"
jquery-validation-unobtrusive "^4.0.0"
"@abp/jquery-validation@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/jquery-validation/-/jquery-validation-9.0.1.tgz"
integrity sha512-uFSxiPMEkaPlcuyXIoKbeOIIRHo4IrgRbmnlHwI1uETrW60ENUdE2LJAVcYS77JROrjVtv8FPlaffWuva6sGeQ==
dependencies:
"@abp/jquery" "~9.0.1"
jquery-validation "^1.21.0"
"@abp/jquery@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/jquery/-/jquery-9.0.1.tgz"
integrity sha512-z8EcnOveItAszbTsM9GFFDQSlcIg/ym6+WZME9uldLoetdxkmI9ij0knVeGj5eqMjQaHvTWwrVLObiBbZwYFWw==
dependencies:
"@abp/core" "~9.0.1"
jquery "~3.7.1"
"@abp/lodash@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/lodash/-/lodash-9.0.1.tgz"
integrity sha512-D+/iOyh/O+jV80bK5vWxyn++IVmeRbZq/UaXanA4RKpzigxJUsgOiSD9lUj85BkfKn2YyFmoR39xwaAqkWoyRA==
dependencies:
"@abp/core" "~9.0.1"
lodash "^4.17.21"
"@abp/luxon@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/luxon/-/luxon-9.0.1.tgz"
integrity sha512-1ZHXP5SGz05tQ1tzYmPcRiZwmkCKGX0KWFoV0zF3ATRaevzku9nXvSy7K6GIFkkgTb9f9XNx4/OBBF/GXkuRqw==
dependencies:
"@abp/core" "~9.0.1"
luxon "^3.5.0"
"@abp/malihu-custom-scrollbar-plugin@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-9.0.1.tgz"
integrity sha512-GkKPLg9Z9UTTSSpW2hYZYZ9IgCvDSOYJmyRSl/h4fG8cWMgGCPVpv8MPPu0+WtIfwW/mT4SPX9X+sjUlRL5XRQ==
dependencies:
"@abp/core" "~9.0.1"
malihu-custom-scrollbar-plugin "^3.1.5"
"@abp/moment@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/moment/-/moment-9.0.1.tgz"
integrity sha512-bTuCc7pi/DCtgz7t96UBU0wn9UGt4b50JhDCVeTKquh+gP1sgWoI5hyvEBkmgE4dcffO0yzZU2opHYTKYGl/OQ==
dependencies:
moment "^2.30.1"
"@abp/select2@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/select2/-/select2-9.0.1.tgz"
integrity sha512-epyYJH2gAOU2UvGn5FD6372hbW3fL7uZIgGpvfgEfa+l6HPdlV9B1OweU2xkONNCoylShAcP/y8qf+bUh8WDEA==
dependencies:
"@abp/core" "~9.0.1"
select2 "^4.0.13"
"@abp/sweetalert2@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/sweetalert2/-/sweetalert2-9.0.1.tgz"
integrity sha512-0RXR/lzy3qMJLisGUz4qrcA9Clu/Tt1ABGzB64ynG1t/l5XessQsIB5Hkt6MbSyOEsprRsq+ZtKH35CwTRPdAw==
dependencies:
"@abp/core" "~9.0.1"
sweetalert2 "^11.14.1"
"@abp/timeago@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/timeago/-/timeago-9.0.1.tgz"
integrity sha512-dNfUQwilrY+JHxL5lwJ++ixYDGAs5lF1EDxKMQMIXD/ak5L8rkdLns8Otta7FhgDDny9UJ7XWQjYsG8ZxxybRQ==
dependencies:
"@abp/jquery" "~9.0.1"
timeago "^1.6.7"
"@abp/toastr@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/toastr/-/toastr-9.0.1.tgz"
integrity sha512-10KuHnSJOxkvzqs6Aim6GJp8xBuT+TsZqBE1KaXQnERPawmOo4+ME28kA/7lq8fvgFUNO3K41T2uuA1GPHVQcg==
dependencies:
"@abp/jquery" "~9.0.1"
toastr "^2.1.4"
"@abp/utils@~9.0.1":
version "9.0.1"
resolved "https://registry.npmjs.org/@abp/utils/-/utils-9.0.1.tgz"
integrity sha512-7eOKT0ciKNdtuASck1kifyc4dC6CeebgxV+rx/EAi3YwPMDkqie6YwLGUqKdGW2N/MZ15JuDR6gkuZxKHEb0NQ==
dependencies:
just-compare "^2.3.0"
"@fortawesome/fontawesome-free@^6.6.0":
version "6.7.1"
resolved "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.1.tgz"
integrity sha512-ALIk/MOh5gYe1TG/ieS5mVUsk7VUIJTJKPMK9rFFqOgfp0Q3d5QiBXbcOMwUvs37fyZVCz46YjOE6IFeOAXCHA==
ansi-colors@^4.1.3:
version "4.1.3"
resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz"
integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==
bootstrap-datepicker@^1.10.0:
version "1.10.0"
resolved "https://registry.npmjs.org/bootstrap-datepicker/-/bootstrap-datepicker-1.10.0.tgz"
integrity sha512-lWxtSYddAQOpbAO8UhYhHLcK6425eWoSjb5JDvZU3ePHEPF6A3eUr51WKaFy4PccU19JRxUG6wEU3KdhtKfvpg==
dependencies:
jquery ">=3.4.0 <4.0.0"
bootstrap-daterangepicker@^3.1.0:
version "3.1.0"
resolved "https://registry.npmjs.org/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz"
integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g==
dependencies:
jquery ">=1.10"
moment "^2.9.0"
bootstrap@^5.3.3:
version "5.3.3"
resolved "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz"
integrity sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==
datatables.net-bs5@^2.1.8:
version "2.1.8"
resolved "https://registry.npmjs.org/datatables.net-bs5/-/datatables.net-bs5-2.1.8.tgz"
integrity sha512-YlGws8eI3iw/1AmKJH18+YMzm/UgGb6o9s14KAC24QT1/8anolm8GnVAgGcwUcvHm3hn1i8A5QXqgbqeMRINeg==
dependencies:
datatables.net "2.1.8"
jquery ">=1.7"
datatables.net@2.1.8, datatables.net@^2.1.8:
version "2.1.8"
resolved "https://registry.npmjs.org/datatables.net/-/datatables.net-2.1.8.tgz"
integrity sha512-47ULt+U4bcjbuGTpTlT6SnCuSFVRBxxdWa6X3NfvTObBJ2BZU0o+JUIl05wQ6cABNIavjbAV51gpgvFsMHL9zA==
dependencies:
jquery ">=1.7"
jquery-form@^4.3.0:
version "4.3.0"
resolved "https://registry.npmjs.org/jquery-form/-/jquery-form-4.3.0.tgz"
integrity sha512-q3uaVCEWdLOYUCI6dpNdwf/7cJFOsUgdpq6r0taxtGQ5NJSkOzofyWm4jpOuJ5YxdmL1FI5QR+q+HB63HHLGnQ==
dependencies:
jquery ">=1.7.2"
jquery-mousewheel@>=3.0.6:
version "3.1.13"
resolved "https://registry.npmjs.org/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz"
integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg==
jquery-validation-unobtrusive@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-4.0.0.tgz"
integrity sha512-1ervYFFv6LX/rp7ktuLnMakHNG0piNRDyROI8Ir3hL1vPIwylAehB1AY3BPrYJnzW3WmwWryZq+Bz4sazZK9iQ==
dependencies:
jquery "^3.6.0"
jquery-validation ">=1.19"
jquery-validation@>=1.19, jquery-validation@^1.21.0:
version "1.21.0"
resolved "https://registry.npmjs.org/jquery-validation/-/jquery-validation-1.21.0.tgz"
integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w==
jquery@>=1.10, jquery@>=1.12.0, "jquery@>=1.5.0 <4.0", jquery@>=1.7, jquery@>=1.7.2, "jquery@>=3.4.0 <4.0.0", jquery@^3.6.0, jquery@~3.7.1:
version "3.7.1"
resolved "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz"
integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==
just-compare@^2.3.0:
version "2.3.0"
resolved "https://registry.npmjs.org/just-compare/-/just-compare-2.3.0.tgz"
integrity sha512-6shoR7HDT+fzfL3gBahx1jZG3hWLrhPAf+l7nCwahDdT9XDtosB9kIF0ZrzUp5QY8dJWfQVr5rnsPqsbvflDzg==
lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
luxon@^3.5.0:
version "3.5.0"
resolved "https://registry.npmjs.org/luxon/-/luxon-3.5.0.tgz"
integrity sha512-rh+Zjr6DNfUYR3bPwJEnuwDdqMbxZW7LOQfUN4B54+Cl+0o5zaU9RJ6bcidfDtC1cWCZXQ+nvX8bf6bAji37QQ==
malihu-custom-scrollbar-plugin@^3.1.5:
version "3.1.5"
resolved "https://registry.npmjs.org/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz"
integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ==
dependencies:
jquery-mousewheel ">=3.0.6"
moment@^2.30.1, moment@^2.9.0:
version "2.30.1"
resolved "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz"
integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==
select2@^4.0.13:
version "4.0.13"
resolved "https://registry.npmjs.org/select2/-/select2-4.0.13.tgz"
integrity sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw==
sweetalert2@^11.14.1:
version "11.14.5"
resolved "https://registry.npmjs.org/sweetalert2/-/sweetalert2-11.14.5.tgz"
integrity sha512-8MWk5uc/r6bWhiJWkUXyEuApfXAhSCZT8FFX7pZXL7YwaPxq+9Ynhi2dUzWkOFn9jvLjKj22CXuccZ+IHcnjvQ==
timeago@^1.6.7:
version "1.6.7"
resolved "https://registry.npmjs.org/timeago/-/timeago-1.6.7.tgz"
integrity sha512-FikcjN98+ij0siKH4VO4dZ358PR3oDDq4Vdl1+sN9gWz1/+JXGr3uZbUShYH/hL7bMhcTpPbplJU5Tej4b4jbQ==
dependencies:
jquery ">=1.5.0 <4.0"
toastr@^2.1.4:
version "2.1.4"
resolved "https://registry.npmjs.org/toastr/-/toastr-2.1.4.tgz"
integrity sha512-LIy77F5n+sz4tefMmFOntcJ6HL0Fv3k1TDnNmFZ0bU/GcvIIfy6eG2v7zQmMiYgaalAiUv75ttFrPn5s0gyqlA==
dependencies:
jquery ">=1.12.0"

53
samples/BookStore/src/BookStore.DbMigrator/BookStore.DbMigrator.csproj

@ -1,53 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<UserSecretsId>BookStore-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<None Remove="appsettings.json" />
<Content Include="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Remove="appsettings.secrets.json" />
<Content Include="appsettings.secrets.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="Serilog.Extensions.Logging" />
<PackageReference Include="Serilog.Sinks.Async" />
<PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="Serilog.Sinks.Console" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" />
<ProjectReference Include="..\BookStore.Application.Contracts\BookStore.Application.Contracts.csproj" />
<ProjectReference Include="..\BookStore.EntityFrameworkCore\BookStore.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<None Update="Properties\launchSettings.json">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
<CopyToPublishDirectory>Never</CopyToPublishDirectory>
</None>
</ItemGroup>
</Project>

19
samples/BookStore/src/BookStore.DbMigrator/BookStoreDbMigratorModule.cs

@ -1,19 +0,0 @@
using BookStore.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.Modularity;
namespace BookStore.DbMigrator;
[DependsOn(
typeof(AbpAutofacModule),
typeof(BookStoreEntityFrameworkCoreModule),
typeof(BookStoreApplicationContractsModule)
)]
public class BookStoreDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpBackgroundJobOptions>(options => options.IsJobExecutionEnabled = false);
}
}

10
samples/BookStore/src/BookStore.DbMigrator/Properties/launchSettings.json

@ -1,10 +0,0 @@
{
"profiles": {
"BookStore.DbMigrator": {
"commandName": "Project",
"environmentVariables": {
"DOTNET_ENVIRONMENT": "Development"
}
}
}
}

33
samples/BookStore/src/BookStore.DbMigrator/appsettings.json

@ -1,33 +0,0 @@
{
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=AntBlazorDemo;Trusted_Connection=True"
},
"IdentityServer": {
"Clients": {
"BookStore_Web": {
"ClientId": "BookStore_Web",
"ClientSecret": "1q2w3e*",
"RootUrl": "https://localhost:44364"
},
"BookStore_App": {
"ClientId": "BookStore_App",
"ClientSecret": "1q2w3e*",
"RootUrl": "http://localhost:4200"
},
"BookStore_Blazor": {
"ClientId": "BookStore_Blazor",
"RootUrl": "https://localhost:44307"
},
"BookStore_BlazorServerTiered": {
"ClientId": "BookStore_BlazorServerTiered",
"ClientSecret": "1q2w3e*",
"RootUrl": "https://localhost:44314"
},
"BookStore_Swagger": {
"ClientId": "BookStore_Swagger",
"ClientSecret": "1q2w3e*",
"RootUrl": "https://localhost:44306"
}
}
}
}

2
samples/BookStore/src/BookStore.DbMigrator/appsettings.secrets.json

@ -1,2 +0,0 @@
{
}

1
samples/BookStore/src/BookStore.DbMigrator/tempkey.jwk

@ -1 +0,0 @@
{"AdditionalData":{},"Alg":"RS256","Crv":null,"D":"RQqr8Z8ir1NA_0eRG_JqM5joAE6Pt-fxInYHa1F10YI4LHzU9NBRK3-xqimQgBUZYQs_YsZWi4GVKg1fu4Zlj86iYLVv39dNMLLPK7gFyv3EzwT4Z3Fm_kddRyavOKPF8zku_lIhj45BEpVA0aCd4vd9e3WiV6l8_Ig3MYaA2xukt0MbuhoB9VvWCYeC3vTvsGGweAxrMVjtrmTorLR0EMC8uv9dEkentmmAd2_DI7lYHIbD58TKGa9oCNQIVPRryPtJoRmqNqd9wvXUk01mBNaSnuRap2VM_2XmNQZAaet5X8q02b9dGJOOrv82Ypc_o8enZhO6JKrD8B7M2k69cQ","DP":"Yzr8OPucm3GvZYdREv2_5cd1QbmLzyXBQJxu201e4ko3rP5SP-nNygG2Uh8DLHiyUgElL5NF-wrfXH7kvvPCbh5I1DVp_-FfU9nFT1_9nNaesWNyeJ2L1AdaQQ5KW0h3bhvm5lDtTLIX3VRrPdmSVEeWJb4ptwb15P0tlidmGTU","DQ":"KtvbqSOmGaZlNHWd6SyY0elBLQSQTBYRFqMNcwQO66vvqI0cg-9xg6sFBtTE66jQ_tqfjCAycr1FAoPgZtV47AG9-9bBthDNrhQ8UnFIbzLWk1z7NVcfycitI2BQRIo5Os6DJRbIOs4Z8G0XDP_IubVzHSi_iEQKa0Mm73h8HIs","E":"AQAB","K":null,"KeyId":"FF8EFB08BDDF8DB9A9746ED51EE4D47B","Kid":"FF8EFB08BDDF8DB9A9746ED51EE4D47B","Kty":"RSA","N":"l9vattvq0RJAbPLFo_7QzAeF3rhp5_CuZiGyIsl4I2X7PwmrZwsVTlRzJT9K5mA9gENc8iFqhO7JsmvKU5CFz024_fiDU9BpGCj24U2l6mEel-rkyOzYGN4cPKhQ01Bw6-NJyCD9x9e6LGNH_UNSIjT_cOwmvia8ugn_mkD5YYs_YQKa18Re0b1d1P5x_YofFdVfJB6t0mYtDBHbPqVVPCCOSRX0NkJ2bn7RLhs9TqiNbGhOWRQGj1wujiz73ab0szSJ-DZjR9n9qhzbkWeoQUZvihJuABTIQd_0_mWOVq30aFHfMgQHz8_Nd0BY4CKjLIBcSDtwOL5pmI1zix_PPQ","Oth":null,"P":"xgREcF60bc0bGsH1Eu6zxx-Xzpop8SO4JkU-5xrY2fQywRRetbcNk8WSbwJ9Jp1qk8l95Ki5kVms9r3cuBaVtTSrcd6nsaQLk8DG31F-3FEYLgmqIcSDR0Eq5AVDx_YLLq-sdLwqcrR4yQRaoCUK8WBJMFirpyS4nStIIPbpwhM","Q":"xFN_5ss4DBrRy_salfSMVCLEsD6mdJl5azy_2oXE-6Gngh3CABtLnobSIv7ncKtuDlf4iLNWWiQ_Vqxdc6R0DAAbcN3VZI1IAC1ro_xCEiF-BsF5FwjgnQpOH43ViVcVL65epgyDXZH4IukRu-CJ4ILHfF_HC7ZmKJMNDi3V028","QI":"mCMDSsxX8z7QAU_giIlKscCQVquPFT8coR_eqs4nu4DBnUbu1R5qYWIm0EQ00OhSEokiys__AxpJmb0NL5QH-UQJYHPcKIhJLkcfGQd2Rt_hGH54rw3bhRNMPwnekv_jkzqGKG9lf8hlA7Z3gMawztjU2zLnUMcuQy0AsQ0YWbs","Use":null,"X":null,"X5t":null,"X5tS256":null,"X5u":null,"Y":null,"KeySize":2048,"HasPrivateKey":true,"CryptoProviderFactory":{"CryptoProviderCache":{},"CustomCryptoProvider":null,"CacheSignatureProviders":true,"SignatureProviderObjectPoolCacheSize":64}}

13
samples/BookStore/src/BookStore.DbMigrator/tempkey.rsa

@ -1,13 +0,0 @@
{
"KeyId": "f788zGVUZh9H-HbWL1S-Mg",
"Parameters": {
"D": "F19hbC5PLO872DszGiJnVoU55ee7XGXmNf0KEKndJ/uGBv5lWklXA0QF80h1ytWXde0jV5isQPB1t7mPhRQlDoDTkywLi1CeOgBPbxzHEfLjZZ5c4olfeX0IJX9BDqgUntY0H1a/+Om/eDu4OZUz3EIJFFZBgz46YZSyTT6ZDvAEdpC/o66sNJmxvJIp+8zVoVDSqBUzxmc+oEamXLg7r2jdymxJMxau1kQFxEGLOrJnNxGsEe8UrYA3qSsm8m/Xg4uOh7RYgnuEEt88+KTvRq+CAMWhN3YNLtOJ3NmXowwE7e1Ma+jih9+UVfxZn14P5+SOJbQ2bYV2sCV+2vBiCQ==",
"DP": "oPiGO/qdOQfFEAS9fMInQnsrNylIZVpDYEVoDJ6/jQfE/IpuwxGcmsaGvCob3SKxZiJRLCWpwJYo1hCh/JOSVGWMkVyELky56nbbkkV5ymKLSGZ4JoetdQs+GchnPdR+k2P9Ij1Kjk13ylubN3htzNhcBASJpOfSEv5pPVzGKX0=",
"DQ": "z6imxLABHkyftbfUUtpeOlPanEHgpuIjmUdp3T1Ju1jziE63UEhuj0GPAXOF17uYxixwYE8JhOJ7+TyIK9oZeI3zH2OzJqQh8f5PCQ/E+0ULXZDeNV/ShDLCTufu3Fis9Rt64uTp/H/l21oMQ79jc0ysa8DTz1ReJLRc5qjL41U=",
"Exponent": "AQAB",
"InverseQ": "ieZcvSt5XYukKJKhXpv5Dm/1RD7iH88cZnhLSTEVTMoOUHoYWmApY5pNLGahbfjA9bxnkBWDYex/i7wE9uNNY5CsA6ovUaQLVJDt3kHvR9W+9QtN8D6jjG2TuRbbOdEg4RqhfjUaDfDIgTJX2Wxc8U98FOvOyGw1HzwUPFZKecM=",
"Modulus": "vk4z1Bmtmbo+gxITcY+FIlXzcO2wTOGlOXK5GMYj/6PUMFt7lbqkc72AkPsrAo5/JE8LYLhWj7fzSKbjvtowHCz5m2t+FlUYmuiKpvvnJsTqvQrckNlbZ1nm071q5PhP3Dar/OksfBhPtAX+c3+NjDnM/w53ccJJNaBDO/s9JYoN7vH5n6ed1pMSK71hmg4MPsxChcnc1f1PpnG2mqyJ253+GEUbj/kRyeBSmCCr9aadov2ZzxIKVaFNagJEHOzanQmorSLpP25GfOHCuy27Zkef94V/qU9elzjbH4uIKslVGx5T6H99TYh0sUGu11NytYJa5WNAZWow95CzurC2vw==",
"P": "4GMCQy+XTNzR5TsgFcdAZv2K6TcQR13fHVvPoxQp/b32V5YUJOBFEUAtqociy5ro4+KzpXP5WPSk1ZtznGKuNZyLq8gTnhpB3rwd0sdo4zxKnQ5nu+n1UhlhWNxg5A9V5TaciUAyPrHWJfLoYTQWygNTgJELQH5zZXi2ihC2uiU=",
"Q": "2R36pamnLAJggkPJxiW5qH6HizZ+bkQVg0BBftMLzkAM8Y9CwTW75GRUzGEJFpMckkw0GZSYb1Uwl3DVUpkcQ8LZ91IPYdPpDlYUshhIxl184M55pnO14besKxJtMZ64zhHKVAR2pBMO0n6W4/1iBXkkQqyPViJxdfvXPJMBbhM="
}
}

58
samples/BookStore/src/BookStore.Domain.Shared/BookStoreDomainSharedModule.cs

@ -1,58 +0,0 @@
using BookStore.Localization;
using Volo.Abp.AuditLogging;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.IdentityServer;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;
namespace BookStore;
[DependsOn(
typeof(AbpAuditLoggingDomainSharedModule),
typeof(AbpBackgroundJobsDomainSharedModule),
typeof(AbpFeatureManagementDomainSharedModule),
typeof(AbpIdentityDomainSharedModule),
typeof(AbpIdentityServerDomainSharedModule),
typeof(AbpPermissionManagementDomainSharedModule),
typeof(AbpSettingManagementDomainSharedModule),
typeof(AbpTenantManagementDomainSharedModule)
)]
public class BookStoreDomainSharedModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
BookStoreGlobalFeatureConfigurator.Configure();
BookStoreModuleExtensionConfigurator.Configure();
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<BookStoreDomainSharedModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<BookStoreResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/BookStore");
options.DefaultResourceType = typeof(BookStoreResource);
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("BookStore", typeof(BookStoreResource));
});
}
}

82
samples/BookStore/src/BookStore.Domain.Shared/BookStoreModuleExtensionConfigurator.cs

@ -1,82 +0,0 @@
using BookStore.Identity;
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace BookStore;
public static class BookStoreModuleExtensionConfigurator
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
ConfigureExistingProperties();
ConfigureExtraProperties();
});
}
private static void ConfigureExistingProperties()
{
/* You can change max lengths for properties of the
* entities defined in the modules used by your application.
*
* Example: Change user and role name max lengths
IdentityUserConsts.MaxNameLength = 99;
IdentityRoleConsts.MaxNameLength = 99;
* Notice: It is not suggested to change property lengths
* unless you really need it. Go with the standard values wherever possible.
*
* If you are using EF Core, you will need to run the add-migration command after your changes.
*/
}
private static void ConfigureExtraProperties()
{
/* You can configure extra properties for the
* entities defined in the modules used by your application.
*
* This class can be used to define these extra properties
* with a high level, easy to use API.
*
* Example: Add a new property to the user entity of the identity module
ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<string>( //property type: string
"SocialSecurityNumber", //property name
property =>
{
//validation rules
property.Attributes.Add(new RequiredAttribute());
property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
//...other configurations for this property
}
);
});
});
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
*/
ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity => {
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<IdentityUserType>("IdentityUserType", property =>
{
property.DefaultValue = IdentityUserType.Normal;
});
});
});
}
}

7
samples/BookStore/src/BookStore.Domain.Shared/Identity/IdentityUserType.cs

@ -1,7 +0,0 @@
namespace BookStore.Identity;
public enum IdentityUserType
{
Normal,
Basic
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/ar.json

@ -1,8 +0,0 @@
{
"culture": "ar",
"texts": {
"Menu:Home": "الرئيسية",
"Welcome": "مرحبا",
"LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/cs.json

@ -1,8 +0,0 @@
{
"culture": "cs",
"texts": {
"Menu:Home": "Úvod",
"Welcome": "Vítejte",
"LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/de-DE.json

@ -1,8 +0,0 @@
{
"culture": "de-DE",
"texts": {
"Menu:Home": "Home",
"Welcome": "Willkommen",
"LongWelcomeMessage": "Willkommen bei der Anwendung. Dies ist ein Startup-Projekt, das auf dem ABP-Framework basiert. Weitere Informationen finden Sie unter abp.io."
}
}

11
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/en.json

@ -1,11 +0,0 @@
{
"culture": "en",
"texts": {
"Menu:Home": "Home",
"Welcome": "Welcome",
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io.",
"IdentityUserType": "User Type",
"Enum:IdentityUserType.Normal": "Normal User",
"Enum:IdentityUserType.Basic": "Basic User"
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/es.json

@ -1,8 +0,0 @@
{
"culture": "es",
"texts": {
"Menu:Home": "Inicio",
"Welcome": "Bienvenido",
"LongWelcomeMessage": "Bienvenido a la aplicación, este es un proyecto base basado en el framework ABP. Para más información, visita abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/fi.json

@ -1,8 +0,0 @@
{
"culture": "fi",
"texts": {
"Menu:Home": "Koti",
"Welcome": "Tervetuloa",
"LongWelcomeMessage": "Tervetuloa sovellukseen. Tämä on ABP-kehykseen perustuva käynnistysprojekti. Lisätietoja on osoitteessa abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/fr.json

@ -1,8 +0,0 @@
{
"culture": "fr",
"texts": {
"Menu:Home": "Accueil",
"Welcome": "Bienvenue",
"LongWelcomeMessage": "Bienvenue dans l'application. Il s'agit d'un projet de démarrage basé sur le framework ABP. Pour plus d'informations, visitez abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/hi.json

@ -1,8 +0,0 @@
{
"culture": "hi",
"texts": {
"Menu:Home": "घर",
"Welcome": "स्वागत हे",
"LongWelcomeMessage": "आवेदन करने के लिए आपका स्वागत है। यह एबीपी ढांचे पर आधारित एक स्टार्टअप परियोजना है। अधिक जानकारी के लिए, abp.io पर जाएं।"
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/hu.json

@ -1,8 +0,0 @@
{
"culture": "hu",
"texts": {
"Menu:Home": "Kezdőlap",
"Welcome": "Üdvözlöm",
"LongWelcomeMessage": "Üdvözöljük az alkalmazásban. Ez egy ABP keretrendszeren alapuló startup projekt. További információkért látogasson el az abp.io oldalra."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/is.json

@ -1,8 +0,0 @@
{
"culture": "is",
"texts": {
"Menu:Home": "Heim",
"Welcome": "Velkomin",
"LongWelcomeMessage": "Verið velkomin í forritið. Þetta er startup verkefni sem byggir á ABP. Nánari upplýsingar er að finna á abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/it.json

@ -1,8 +0,0 @@
{
"culture": "it",
"texts": {
"Menu:Home": "Home",
"Welcome": "Benvenuto",
"LongWelcomeMessage": "Benvenuto nell'applicazione. Questo è un progetto di avvio basato sul framework ABP. Per ulteriori informazioni, visita abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/nl.json

@ -1,8 +0,0 @@
{
"culture": "nl",
"texts": {
"Menu:Home": "Home",
"Welcome": "Welkom",
"LongWelcomeMessage": "Welkom bij de applicatie. Dit is een startup-project gebaseerd op het ABP-framework. Bezoek abp.io voor meer informatie."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/pl-PL.json

@ -1,8 +0,0 @@
{
"culture": "pl-PL",
"texts": {
"Menu:Home": "Home",
"Welcome": "Witaj",
"LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/pt-BR.json

@ -1,8 +0,0 @@
{
"culture": "pt-BR",
"texts": {
"Menu:Home": "Principal",
"Welcome": "Seja bem-vindo!",
"LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/ro-RO.json

@ -1,8 +0,0 @@
{
"culture": "ro-RO",
"texts": {
"Menu:Home": "Acasă",
"Welcome": "Bun venit",
"LongWelcomeMessage": "Bun venit la aplicaţie. Acesta este un proiect de pornire bazat pe framework-ul ABP. Pentru mai multe informaţii, vizitaţi, visit abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/ru.json

@ -1,8 +0,0 @@
{
"culture": "ru",
"texts": {
"Menu:Home": "Главная",
"Welcome": "Добро пожаловать",
"LongWelcomeMessage": "Добро пожаловать в приложение. Этот запущенный проект основан на фреймворке ABP. Для получения дополнительной информации посетите сайт abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/sk.json

@ -1,8 +0,0 @@
{
"culture": "sk",
"texts": {
"Menu:Home": "Domov",
"Welcome": "Vitajte",
"LongWelcomeMessage": "Vitajte v aplikácii. Toto je štartovací projekt založený na ABP frameworku. Viac informácií nájdete na stránke abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/sl.json

@ -1,8 +0,0 @@
{
"culture": "sl",
"texts": {
"Menu:Home": "Domov",
"Welcome": "Dobrodošli",
"LongWelcomeMessage": "Dobrodošli v aplikaciji. To je začetni projekt na osnovi okolja ABP. Za več informacij obiščite abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/tr.json

@ -1,8 +0,0 @@
{
"culture": "tr",
"texts": {
"Menu:Home": "Ana sayfa",
"Welcome": "Hoşgeldiniz",
"LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz."
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/vi.json

@ -1,8 +0,0 @@
{
"culture": "vi",
"texts": {
"Menu:Home": "Trang chủ",
"Welcome": "Chào mừng bạn",
"LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là một dự án khởi nghiệp dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io."
}
}

11
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/zh-Hans.json

@ -1,11 +0,0 @@
{
"culture": "zh-Hans",
"texts": {
"Menu:Home": "首页",
"Welcome": "欢迎",
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io.",
"IdentityUserType": "用户类型",
"Enum:IdentityUserType.Normal": "标准用户",
"Enum:IdentityUserType.Basic": "基础用户"
}
}

8
samples/BookStore/src/BookStore.Domain.Shared/Localization/BookStore/zh-Hant.json

@ -1,8 +0,0 @@
{
"culture": "zh-Hant",
"texts": {
"Menu:Home": "首頁",
"Welcome": "歡迎",
"LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io."
}
}

8
samples/BookStore/src/BookStore.Domain/BookStoreConsts.cs

@ -1,8 +0,0 @@
namespace BookStore;
public static class BookStoreConsts
{
public const string DbTablePrefix = "App";
public const string DbSchema = null;
}

219
samples/BookStore/src/BookStore.Domain/Data/BookStoreDbMigrationService.cs

@ -1,219 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.TenantManagement;
namespace BookStore.Data;
public class BookStoreDbMigrationService : ITransientDependency
{
public ILogger<BookStoreDbMigrationService> Logger { get; set; }
private readonly IDataSeeder _dataSeeder;
private readonly IEnumerable<IBookStoreDbSchemaMigrator> _dbSchemaMigrators;
private readonly ITenantRepository _tenantRepository;
private readonly ICurrentTenant _currentTenant;
public BookStoreDbMigrationService(
IDataSeeder dataSeeder,
IEnumerable<IBookStoreDbSchemaMigrator> dbSchemaMigrators,
ITenantRepository tenantRepository,
ICurrentTenant currentTenant)
{
_dataSeeder = dataSeeder;
_dbSchemaMigrators = dbSchemaMigrators;
_tenantRepository = tenantRepository;
_currentTenant = currentTenant;
Logger = NullLogger<BookStoreDbMigrationService>.Instance;
}
public async Task MigrateAsync()
{
var initialMigrationAdded = AddInitialMigrationIfNotExist();
if (initialMigrationAdded)
{
return;
}
Logger.LogInformation("Started database migrations...");
await MigrateDatabaseSchemaAsync();
await SeedDataAsync();
Logger.LogInformation($"Successfully completed host database migrations.");
var tenants = await _tenantRepository.GetListAsync(includeDetails: true);
var migratedDatabaseSchemas = new HashSet<string>();
foreach (var tenant in tenants)
{
using (_currentTenant.Change(tenant.Id))
{
if (tenant.ConnectionStrings.Any())
{
var tenantConnectionStrings = tenant.ConnectionStrings
.Select(x => x.Value)
.ToList();
if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings))
{
await MigrateDatabaseSchemaAsync(tenant);
migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings);
}
}
await SeedDataAsync(tenant);
}
Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations.");
}
Logger.LogInformation("Successfully completed all database migrations.");
Logger.LogInformation("You can safely end this process...");
}
private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null)
{
Logger.LogInformation(
$"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
foreach (var migrator in _dbSchemaMigrators)
{
await migrator.MigrateAsync();
}
}
private async Task SeedDataAsync(Tenant tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id)
.WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue)
.WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue)
);
}
private bool AddInitialMigrationIfNotExist()
{
try
{
if (!DbMigrationsProjectExists())
{
return false;
}
}
catch (Exception)
{
return false;
}
try
{
if (!MigrationsFolderExists())
{
AddInitialMigration();
return true;
}
else
{
return false;
}
}
catch (Exception e)
{
Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message);
return false;
}
}
private bool DbMigrationsProjectExists()
{
var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
return dbMigrationsProjectFolder != null;
}
private bool MigrationsFolderExists()
{
var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
return Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations"));
}
private void AddInitialMigration()
{
Logger.LogInformation("Creating initial migration...");
string argumentPrefix;
string fileName;
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
argumentPrefix = "-c";
fileName = "/bin/bash";
}
else
{
argumentPrefix = "/C";
fileName = "cmd.exe";
}
var procStartInfo = new ProcessStartInfo(fileName,
$"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetEntityFrameworkCoreProjectFolderPath()}\"\""
);
try
{
Process.Start(procStartInfo);
}
catch (Exception)
{
throw new Exception("Couldn't run ABP CLI...");
}
}
private string GetEntityFrameworkCoreProjectFolderPath()
{
var slnDirectoryPath = GetSolutionDirectoryPath();
if (slnDirectoryPath == null)
{
throw new Exception("Solution folder not found!");
}
var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src");
return Directory.GetDirectories(srcDirectoryPath)
.FirstOrDefault(d => d.EndsWith(".EntityFrameworkCore"));
}
private string GetSolutionDirectoryPath()
{
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
while (Directory.GetParent(currentDirectory.FullName) != null)
{
currentDirectory = Directory.GetParent(currentDirectory.FullName);
if (Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null)
{
return currentDirectory.FullName;
}
}
return null;
}
}

306
samples/BookStore/src/BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs

@ -1,306 +0,0 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using IdentityServer4.Models;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
using Volo.Abp.IdentityServer.ApiResources;
using Volo.Abp.IdentityServer.ApiScopes;
using Volo.Abp.IdentityServer.Clients;
using Volo.Abp.IdentityServer.IdentityResources;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource;
using ApiScope = Volo.Abp.IdentityServer.ApiScopes.ApiScope;
using Client = Volo.Abp.IdentityServer.Clients.Client;
namespace BookStore.IdentityServer;
public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency
{
private readonly IApiResourceRepository _apiResourceRepository;
private readonly IApiScopeRepository _apiScopeRepository;
private readonly IClientRepository _clientRepository;
private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder;
private readonly IGuidGenerator _guidGenerator;
private readonly IPermissionDataSeeder _permissionDataSeeder;
private readonly IConfiguration _configuration;
private readonly ICurrentTenant _currentTenant;
public IdentityServerDataSeedContributor(
IClientRepository clientRepository,
IApiResourceRepository apiResourceRepository,
IApiScopeRepository apiScopeRepository,
IIdentityResourceDataSeeder identityResourceDataSeeder,
IGuidGenerator guidGenerator,
IPermissionDataSeeder permissionDataSeeder,
IConfiguration configuration,
ICurrentTenant currentTenant)
{
_clientRepository = clientRepository;
_apiResourceRepository = apiResourceRepository;
_apiScopeRepository = apiScopeRepository;
_identityResourceDataSeeder = identityResourceDataSeeder;
_guidGenerator = guidGenerator;
_permissionDataSeeder = permissionDataSeeder;
_configuration = configuration;
_currentTenant = currentTenant;
}
[UnitOfWork]
public virtual async Task SeedAsync(DataSeedContext context)
{
using (_currentTenant.Change(context?.TenantId))
{
await _identityResourceDataSeeder.CreateStandardResourcesAsync();
await CreateApiResourcesAsync();
await CreateApiScopesAsync();
await CreateClientsAsync();
}
}
private async Task CreateApiScopesAsync()
{
await CreateApiScopeAsync("BookStore");
}
private async Task CreateApiResourcesAsync()
{
var commonApiUserClaims = new[]
{
"email",
"email_verified",
"name",
"phone_number",
"phone_number_verified",
"role"
};
await CreateApiResourceAsync("BookStore", commonApiUserClaims);
}
private async Task<ApiResource> CreateApiResourceAsync(string name, IEnumerable<string> claims)
{
var apiResource = await _apiResourceRepository.FindByNameAsync(name);
if (apiResource == null)
{
apiResource = await _apiResourceRepository.InsertAsync(
new ApiResource(
_guidGenerator.Create(),
name,
name + " API"
),
autoSave: true
);
}
foreach (var claim in claims)
{
if (apiResource.FindClaim(claim) == null)
{
apiResource.AddUserClaim(claim);
}
}
return await _apiResourceRepository.UpdateAsync(apiResource);
}
private async Task<ApiScope> CreateApiScopeAsync(string name)
{
var apiScope = await _apiScopeRepository.FindByNameAsync(name);
if (apiScope == null)
{
apiScope = await _apiScopeRepository.InsertAsync(
new ApiScope(
_guidGenerator.Create(),
name,
name + " API"
),
autoSave: true
);
}
return apiScope;
}
private async Task CreateClientsAsync()
{
var commonScopes = new[]
{
"email",
"openid",
"profile",
"role",
"phone",
"address",
"BookStore"
};
var configurationSection = _configuration.GetSection("IdentityServer:Clients");
//Console Test / Angular Client
var consoleAndAngularClientId = configurationSection["BookStore_App:ClientId"];
if (!consoleAndAngularClientId.IsNullOrWhiteSpace())
{
var webClientRootUrl = configurationSection["BookStore_App:RootUrl"]?.TrimEnd('/');
await CreateClientAsync(
name: consoleAndAngularClientId,
scopes: commonScopes,
grantTypes: new[] { "password", "client_credentials", "authorization_code" },
secret: (configurationSection["BookStore_App:ClientSecret"] ?? "1q2w3e*").Sha256(),
requireClientSecret: false,
redirectUri: webClientRootUrl,
postLogoutRedirectUri: webClientRootUrl,
corsOrigins: new[] { webClientRootUrl.RemovePostFix("/") }
);
}
// Blazor Client
var blazorClientId = configurationSection["BookStore_Blazor:ClientId"];
if (!blazorClientId.IsNullOrWhiteSpace())
{
var blazorRootUrl = configurationSection["BookStore_Blazor:RootUrl"].TrimEnd('/');
await CreateClientAsync(
name: blazorClientId,
scopes: commonScopes,
grantTypes: new[] { "authorization_code" },
secret: configurationSection["BookStore_Blazor:ClientSecret"]?.Sha256(),
requireClientSecret: false,
redirectUri: $"{blazorRootUrl}/authentication/login-callback",
postLogoutRedirectUri: $"{blazorRootUrl}/authentication/logout-callback",
corsOrigins: new[] { blazorRootUrl.RemovePostFix("/") }
);
}
// Swagger Client
var swaggerClientId = configurationSection["BookStore_Swagger:ClientId"];
if (!swaggerClientId.IsNullOrWhiteSpace())
{
var swaggerRootUrl = configurationSection["BookStore_Swagger:RootUrl"].TrimEnd('/');
await CreateClientAsync(
name: swaggerClientId,
scopes: commonScopes,
grantTypes: new[] { "authorization_code" },
secret: configurationSection["BookStore_Swagger:ClientSecret"]?.Sha256(),
requireClientSecret: false,
redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html",
corsOrigins: new[] { swaggerRootUrl.RemovePostFix("/") }
);
}
}
private async Task<Client> CreateClientAsync(
string name,
IEnumerable<string> scopes,
IEnumerable<string> grantTypes,
string secret = null,
string redirectUri = null,
string postLogoutRedirectUri = null,
string frontChannelLogoutUri = null,
bool requireClientSecret = true,
bool requirePkce = false,
IEnumerable<string> permissions = null,
IEnumerable<string> corsOrigins = null)
{
var client = await _clientRepository.FindByClientIdAsync(name);
if (client == null)
{
client = await _clientRepository.InsertAsync(
new Client(
_guidGenerator.Create(),
name
)
{
ClientName = name,
ProtocolType = "oidc",
Description = name,
AlwaysIncludeUserClaimsInIdToken = true,
AllowOfflineAccess = true,
AbsoluteRefreshTokenLifetime = 31536000, //365 days
AccessTokenLifetime = 31536000, //365 days
AuthorizationCodeLifetime = 300,
IdentityTokenLifetime = 300,
RequireConsent = false,
FrontChannelLogoutUri = frontChannelLogoutUri,
RequireClientSecret = requireClientSecret,
RequirePkce = requirePkce
},
autoSave: true
);
}
foreach (var scope in scopes)
{
if (client.FindScope(scope) == null)
{
client.AddScope(scope);
}
}
foreach (var grantType in grantTypes)
{
if (client.FindGrantType(grantType) == null)
{
client.AddGrantType(grantType);
}
}
if (!secret.IsNullOrEmpty())
{
if (client.FindSecret(secret) == null)
{
client.AddSecret(secret);
}
}
if (redirectUri != null)
{
if (client.FindRedirectUri(redirectUri) == null)
{
client.AddRedirectUri(redirectUri);
}
}
if (postLogoutRedirectUri != null)
{
if (client.FindPostLogoutRedirectUri(postLogoutRedirectUri) == null)
{
client.AddPostLogoutRedirectUri(postLogoutRedirectUri);
}
}
if (permissions != null)
{
await _permissionDataSeeder.SeedAsync(
ClientPermissionValueProvider.ProviderName,
name,
permissions,
null
);
}
if (corsOrigins != null)
{
foreach (var origin in corsOrigins)
{
if (!origin.IsNullOrWhiteSpace() && client.FindCorsOrigin(origin) == null)
{
client.AddCorsOrigin(origin);
}
}
}
return await _clientRepository.UpdateAsync(client);
}
}

30
samples/BookStore/src/BookStore.EntityFrameworkCore/BookStore.EntityFrameworkCore.csproj

@ -1,30 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>BookStore</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\BookStore.Domain\BookStore.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>compile; contentFiles; build; buildMultitargeting; buildTransitive; analyzers; native</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>

87
samples/BookStore/src/BookStore.EntityFrameworkCore/EntityFrameworkCore/BookStoreDbContext.cs

@ -1,87 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace BookStore.EntityFrameworkCore;
[ReplaceDbContext(typeof(IIdentityDbContext))]
[ReplaceDbContext(typeof(ITenantManagementDbContext))]
[ConnectionStringName("Default")]
public class BookStoreDbContext :
AbpDbContext<BookStoreDbContext>,
IIdentityDbContext,
ITenantManagementDbContext
{
/* Add DbSet properties for your Aggregate Roots / Entities here. */
#region Entities from the modules
/* Notice: We only implemented IIdentityDbContext and ITenantManagementDbContext
* and replaced them for this DbContext. This allows you to perform JOIN
* queries for the entities of these modules over the repositories easily. You
* typically don't need that for other modules. But, if you need, you can
* implement the DbContext interface of the needed module and use ReplaceDbContext
* attribute just like IIdentityDbContext and ITenantManagementDbContext.
*
* More info: Replacing a DbContext of a module ensures that the related module
* uses this DbContext on runtime. Otherwise, it will use its own DbContext class.
*/
//Identity
public DbSet<IdentityUser> Users { get; set; }
public DbSet<IdentityRole> Roles { get; set; }
public DbSet<IdentityClaimType> ClaimTypes { get; set; }
public DbSet<OrganizationUnit> OrganizationUnits { get; set; }
public DbSet<IdentitySecurityLog> SecurityLogs { get; set; }
public DbSet<IdentityLinkUser> LinkUsers { get; set; }
public DbSet<IdentityUserDelegation> UserDelegations { get; set;}
public DbSet<IdentitySession> Sessions { get; set; }
// Tenant Management
public DbSet<Tenant> Tenants { get; set; }
public DbSet<TenantConnectionString> TenantConnectionStrings { get; set; }
#endregion
public BookStoreDbContext(DbContextOptions<BookStoreDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
/* Include modules to your migration db context */
builder.ConfigurePermissionManagement();
builder.ConfigureSettingManagement();
builder.ConfigureBackgroundJobs();
builder.ConfigureAuditLogging();
builder.ConfigureIdentity();
builder.ConfigureIdentityServer();
builder.ConfigureFeatureManagement();
builder.ConfigureTenantManagement();
/* Configure your own tables/entities inside here */
//builder.Entity<YourEntity>(b =>
//{
// b.ToTable(BookStoreConsts.DbTablePrefix + "YourEntities", BookStoreConsts.DbSchema);
// b.ConfigureByConvention(); //auto configure for the base class props
// //...
//});
}
}

32
samples/BookStore/src/BookStore.EntityFrameworkCore/EntityFrameworkCore/BookStoreDbContextFactory.cs

@ -1,32 +0,0 @@
using System.IO;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace BookStore.EntityFrameworkCore;
/* This class is needed for EF Core console commands
* (like Add-Migration and Update-Database commands) */
public class BookStoreDbContextFactory : IDesignTimeDbContextFactory<BookStoreDbContext>
{
public BookStoreDbContext CreateDbContext(string[] args)
{
BookStoreEfCoreEntityExtensionMappings.Configure();
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<BookStoreDbContext>()
.UseSqlServer(configuration.GetConnectionString("Default"));
return new BookStoreDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../BookStore.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}
}

44
samples/BookStore/src/BookStore.EntityFrameworkCore/EntityFrameworkCore/BookStoreEfCoreEntityExtensionMappings.cs

@ -1,44 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace BookStore.EntityFrameworkCore;
public static class BookStoreEfCoreEntityExtensionMappings
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
BookStoreGlobalFeatureConfigurator.Configure();
BookStoreModuleExtensionConfigurator.Configure();
OneTimeRunner.Run(() =>
{
/* You can configure extra properties for the
* entities defined in the modules used by your application.
*
* This class can be used to map these extra properties to table fields in the database.
*
* USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING.
* USE BookStoreModuleExtensionConfigurator CLASS (in the Domain.Shared project)
* FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES
*
* Example: Map a property to a table field:
ObjectExtensionManager.Instance
.MapEfCoreProperty<IdentityUser, string>(
"MyProperty",
(entityBuilder, propertyBuilder) =>
{
propertyBuilder.HasMaxLength(128);
}
);
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
*/
});
}
}

51
samples/BookStore/src/BookStore.EntityFrameworkCore/EntityFrameworkCore/BookStoreEntityFrameworkCoreModule.cs

@ -1,51 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace BookStore.EntityFrameworkCore;
[DependsOn(
typeof(BookStoreDomainModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule)
)]
public class BookStoreEntityFrameworkCoreModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
BookStoreEfCoreEntityExtensionMappings.Configure();
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<BookStoreDbContext>(options =>
{
/* Remove "includeAllEntities: true" to create
* default repositories only for aggregate roots */
options.AddDefaultRepositories(includeAllEntities: true);
});
Configure<AbpDbContextOptions>(options =>
{
/* The main point to change your DBMS.
* See also BookStoreMigrationsDbContextFactory for EF Core tooling. */
options.UseSqlServer();
});
}
}

34
samples/BookStore/src/BookStore.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreBookStoreDbSchemaMigrator.cs

@ -1,34 +0,0 @@
using System;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using BookStore.Data;
using Volo.Abp.DependencyInjection;
namespace BookStore.EntityFrameworkCore;
public class EntityFrameworkCoreBookStoreDbSchemaMigrator
: IBookStoreDbSchemaMigrator, ITransientDependency
{
private readonly IServiceProvider _serviceProvider;
public EntityFrameworkCoreBookStoreDbSchemaMigrator(
IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
public async Task MigrateAsync()
{
/* We intentionally resolving the BookStoreDbContext
* from IServiceProvider (instead of directly injecting it)
* to properly get the connection string of the current tenant in the
* current scope.
*/
await _serviceProvider
.GetRequiredService<BookStoreDbContext>()
.Database
.MigrateAsync();
}
}

2683
samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20250516090951_initial.Designer.cs

File diff suppressed because it is too large

1592
samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/20250516090951_initial.cs

File diff suppressed because it is too large

2680
samples/BookStore/src/BookStore.EntityFrameworkCore/Migrations/BookStoreDbContextModelSnapshot.cs

File diff suppressed because it is too large

2
samples/BookStore/src/BookStore.EntityFrameworkCore/Properties/AssemblyInfo.cs

@ -1,2 +0,0 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("BookStore.EntityFrameworkCore.Tests")]

39
samples/BookStore/src/BookStore.HttpApi.Host/BookStore.HttpApi.Host.csproj

@ -1,39 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>BookStore</RootNamespace>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>BookStore-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="Serilog.AspNetCore" />
<PackageReference Include="Serilog.Sinks.Async" />
<PackageReference Include="Volo.Abp.AspNetCore.MultiTenancy" />
<PackageReference Include="Volo.Abp.Autofac" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" />
<PackageReference Include="Volo.Abp.Swashbuckle" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BookStore.Application\BookStore.Application.csproj" />
<ProjectReference Include="..\BookStore.EntityFrameworkCore\BookStore.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\BookStore.HttpApi\BookStore.HttpApi.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
</Project>

10
samples/BookStore/src/BookStore.HttpApi.Host/BookStoreBrandingProvider.cs

@ -1,10 +0,0 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Ui.Branding;
namespace BookStore;
[Dependency(ReplaceServices = true)]
public class BookStoreBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "BookStore";
}

250
samples/BookStore/src/BookStore.HttpApi.Host/BookStoreHttpApiHostModule.cs

@ -1,250 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using BookStore.EntityFrameworkCore;
using BookStore.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Microsoft.OpenApi.Models;
using Volo.Abp;
using Volo.Abp.Account;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.Swashbuckle;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.VirtualFileSystem;
namespace BookStore;
[DependsOn(
typeof(BookStoreHttpApiModule),
typeof(AbpAutofacModule),
typeof(AbpAspNetCoreMultiTenancyModule),
typeof(BookStoreApplicationModule),
typeof(BookStoreEntityFrameworkCoreModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpAccountWebIdentityServerModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpSwashbuckleModule)
)]
public class BookStoreHttpApiHostModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
var hostingEnvironment = context.Services.GetHostingEnvironment();
ConfigureBundles();
ConfigureUrls(configuration);
ConfigureConventionalControllers();
ConfigureAuthentication(context, configuration);
ConfigureLocalization();
ConfigureVirtualFileSystem(context);
ConfigureCors(context, configuration);
ConfigureSwaggerServices(context, configuration);
}
private void ConfigureBundles()
{
Configure<AbpBundlingOptions>(options =>
{
options.StyleBundles.Configure(
BasicThemeBundles.Styles.Global,
bundle => { bundle.AddFiles("/global-styles.css"); }
);
});
}
private void ConfigureUrls(IConfiguration configuration)
{
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"].Split(','));
options.Applications["Angular"].RootUrl = configuration["App:ClientUrl"];
options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password";
});
}
private void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
if (hostingEnvironment.IsDevelopment())
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainSharedModule>(
Path.Combine(hostingEnvironment.ContentRootPath,
$"..{Path.DirectorySeparatorChar}BookStore.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreDomainModule>(
Path.Combine(hostingEnvironment.ContentRootPath,
$"..{Path.DirectorySeparatorChar}BookStore.Domain"));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreApplicationContractsModule>(
Path.Combine(hostingEnvironment.ContentRootPath,
$"..{Path.DirectorySeparatorChar}BookStore.Application.Contracts"));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreApplicationModule>(
Path.Combine(hostingEnvironment.ContentRootPath,
$"..{Path.DirectorySeparatorChar}BookStore.Application"));
});
}
}
private void ConfigureConventionalControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(BookStoreApplicationModule).Assembly);
});
}
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAuthentication()
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.Audience = "BookStore";
options.UseSecurityTokenValidators = true;
options.BackchannelHttpHandler = new HttpClientHandler
{
ServerCertificateCustomValidationCallback =
HttpClientHandler.DangerousAcceptAnyServerCertificateValidator
};
#if DEBUG
options.IncludeErrorDetails = true;
#endif
});
}
private static void ConfigureSwaggerServices(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAbpSwaggerGenWithOAuth(
configuration["AuthServer:Authority"],
new Dictionary<string, string>
{
{"BookStore", "BookStore API"}
},
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BookStore API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
});
}
private void ConfigureLocalization()
{
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("ar", "ar", "العربية"));
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
options.Languages.Add(new LanguageInfo("en", "en", "English"));
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish"));
options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi"));
options.Languages.Add(new LanguageInfo("is", "is", "Icelandic"));
options.Languages.Add(new LanguageInfo("it", "it", "Italiano"));
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
options.Languages.Add(new LanguageInfo("ro-RO", "ro-RO", "Română"));
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch"));
options.Languages.Add(new LanguageInfo("es", "es", "Español"));
});
}
private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseAbpRequestLocalization();
if (!env.IsDevelopment())
{
app.UseErrorPage();
}
app.UseCorrelationId();
app.MapAbpStaticAssets();
app.UseRouting();
app.UseCors();
app.UseAuthentication();
app.UseJwtTokenMiddleware();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseIdentityServer();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "BookStore API");
var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
c.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
c.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
c.OAuthScopes("BookStore");
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
}

12
samples/BookStore/src/BookStore.HttpApi.Host/Controllers/HomeController.cs

@ -1,12 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace BookStore.Controllers;
public class HomeController : AbpController
{
public ActionResult Index()
{
return Redirect("~/swagger");
}
}

53
samples/BookStore/src/BookStore.HttpApi.Host/Program.cs

@ -1,53 +0,0 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
namespace BookStore;
public class Program
{
public async static Task<int> Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()
#else
.MinimumLevel.Information()
#endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
#if DEBUG
.WriteTo.Async(c => c.Console())
#endif
.CreateLogger();
try
{
Log.Information("Starting BookStore.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);
builder.Host.AddAppSettingsSecretsJson()
.UseAutofac()
.UseSerilog();
await builder.AddApplicationAsync<BookStoreHttpApiHostModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
return 0;
}
catch (Exception ex)
{
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
}

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

Loading…
Cancel
Save