Browse Source

Add Blazor webapp simple and readme

pull/35/head
liangshiwei 2 years ago
parent
commit
6ba5d5b07c
  1. BIN
      .DS_Store
  2. 64
      README.Blazor.md
  3. 101
      README.WebApp.md
  4. 68
      README.md
  5. 4
      common.props
  6. BIN
      samples/.DS_Store
  7. BIN
      samples/BookStoreWebApp/.DS_Store
  8. 1
      samples/BookStoreWebApp/.gitattributes
  9. 265
      samples/BookStoreWebApp/.gitignore
  10. 5
      samples/BookStoreWebApp/.prettierrc
  11. 130
      samples/BookStoreWebApp/BookStoreWebApp.sln
  12. 23
      samples/BookStoreWebApp/BookStoreWebApp.sln.DotSettings
  13. 5
      samples/BookStoreWebApp/NuGet.Config
  14. 66
      samples/BookStoreWebApp/README.md
  15. 19
      samples/BookStoreWebApp/common.props
  16. 25
      samples/BookStoreWebApp/src/BookStoreWebApp.Application.Contracts/BookStoreWebApp.Application.Contracts.csproj
  17. 28
      samples/BookStoreWebApp/src/BookStoreWebApp.Application.Contracts/BookStoreWebAppApplicationContractsModule.cs
  18. 28
      samples/BookStoreWebApp/src/BookStoreWebApp.Application.Contracts/BookStoreWebAppDtoExtensions.cs
  19. 20
      samples/BookStoreWebApp/src/BookStoreWebApp.Application.Contracts/Permissions/BookStoreWebAppPermissionDefinitionProvider.cs
  20. 9
      samples/BookStoreWebApp/src/BookStoreWebApp.Application.Contracts/Permissions/BookStoreWebAppPermissions.cs
  21. 25
      samples/BookStoreWebApp/src/BookStoreWebApp.Application/BookStoreWebApp.Application.csproj
  22. 17
      samples/BookStoreWebApp/src/BookStoreWebApp.Application/BookStoreWebAppAppService.cs
  23. 13
      samples/BookStoreWebApp/src/BookStoreWebApp.Application/BookStoreWebAppApplicationAutoMapperProfile.cs
  24. 31
      samples/BookStoreWebApp/src/BookStoreWebApp.Application/BookStoreWebAppApplicationModule.cs
  25. 2
      samples/BookStoreWebApp/src/BookStoreWebApp.Application/Properties/AssemblyInfo.cs
  26. 45
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebApp.Blazor.Client.csproj
  27. 11
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebAppBlazorAutoMapperProfile.cs
  28. 102
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebAppBlazorClientModule.cs
  29. 10
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebAppBrandingProvider.cs
  30. 19
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebAppBundleContributor.cs
  31. 12
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebAppComponentBase.cs
  32. 89
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Menus/BookStoreWebAppMenuContributor.cs
  33. 10
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Menus/BookStoreWebAppMenus.cs
  34. 17
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Pages/Index.razor
  35. 6
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Pages/Index.razor.cs
  36. 1
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Pages/Index.razor.css
  37. 22
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Program.cs
  38. 13
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Routes.razor
  39. 18
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/_Imports.razor
  40. 3
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/appsettings.Development.json
  41. 18
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/appsettings.json
  42. 2
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/appsettings.secrets.json
  43. 2
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/global.css
  44. 11
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/global.js
  45. BIN
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/icon-192.png
  46. BIN
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/icon-512.png
  47. 55
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/main.css
  48. 21
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/manifest.json
  49. 4
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/service-worker.js
  50. 48
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/service-worker.published.js
  51. 74
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/BookStoreWebApp.Blazor.csproj
  52. 284
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/BookStoreWebAppBlazorModule.cs
  53. 10
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/BookStoreWebAppBrandingProvider.cs
  54. 12
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/BookStoreWebAppComponentBase.cs
  55. 59
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/Components/App.razor
  56. 56
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/Program.cs
  57. 28
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/Properties/launchSettings.json
  58. 20
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/_Imports.razor
  59. 11
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/abp.resourcemapping.js
  60. 2
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/appsettings.Development.json
  61. 16
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/appsettings.json
  62. 2
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/appsettings.secrets.json
  63. 9
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/package.json
  64. 18
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/web.config
  65. 22
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/blazor-global-styles.css
  66. BIN
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/favicon.ico
  67. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/global-styles.css
  68. BIN
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/images/logo/leptonx/logo-dark-thumbnail.png
  69. BIN
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/images/logo/leptonx/logo-dark.png
  70. BIN
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/images/logo/leptonx/logo-light-thumbnail.png
  71. BIN
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/images/logo/leptonx/logo-light.png
  72. 340
      samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/yarn.lock
  73. 45
      samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/BookStoreWebApp.DbMigrator.csproj
  74. 14
      samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/BookStoreWebAppDbMigratorModule.cs
  75. 51
      samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/DbMigratorHostedService.cs
  76. 41
      samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/Program.cs
  77. 13
      samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/appsettings.json
  78. 2
      samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/appsettings.secrets.json
  79. 32
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/BookStoreWebApp.Domain.Shared.csproj
  80. 6
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/BookStoreWebAppDomainErrorCodes.cs
  81. 58
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/BookStoreWebAppDomainSharedModule.cs
  82. 22
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/BookStoreWebAppGlobalFeatureConfigurator.cs
  83. 73
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/BookStoreWebAppModuleExtensionConfigurator.cs
  84. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/ar.json
  85. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/cs.json
  86. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/de.json
  87. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/en-GB.json
  88. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/en.json
  89. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/es.json
  90. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/fi.json
  91. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/fr.json
  92. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/hi.json
  93. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/hr.json
  94. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/hu.json
  95. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/is.json
  96. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/it.json
  97. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/nl.json
  98. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/pl-PL.json
  99. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/pt-BR.json
  100. 8
      samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/ro-RO.json

BIN
.DS_Store

Binary file not shown.

64
README.Blazor.md

@ -0,0 +1,64 @@
The first step is to use ABP CLI to create a new project.
`abp new BookStore -u blazor`
> See the [ABP official documentation](https://docs.abp.io) to learn [ABP framework](https://github.com/abpframework/abp).
**Replace LeptonXLiteTheme with AntBlazorTheme packages**
* Remove `Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme` Package.
* 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`
```
**Open `_Imports.razor` and add with the following:**
```csharp
@using AntDesign
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout
```
**Open `BookStoreBlazorModule` make the following changes:**
* Remove the `ConfigureBlazorise` method
* Fix wrong using namespace
* Update module dependencies
* For example, replace `AbpIdentityBlazorWebAssemblyModule` with `AbpIdentityBlazorWebAssemblyAntDesignModule`
**Open `BookStoreMenuContributor` to update icon:**
* `"fas fa-home"` to `IconType.Outline.Home`
* `"fa fa-cog"` to `IconType.Outline.Setting`
**Open `Index.razor` and replace with the following:**
```csharp
@page "/"
@inherits BookStoreComponentBase
<AbpPageHeader Title="Index"></AbpPageHeader>
<div class="page-content">
<div style="text-align: center">
<Alert Type="@AlertType.Success"
Message="Success"
Description=" Congratulations, BookStore is successfully running!"
ShowIcon="true"/>
<Divider/>
</div>
</div>
```
Run the `dotnet build` & `abp bundle` command in the `BookStore.Blazor` folder.
That's all, enjoy your code :).
![3](img/3.png)

101
README.WebApp.md

@ -0,0 +1,101 @@
The first step is to use ABP CLI to create a new project.
`abp new BookStoreWebApp -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.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.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`
**Remove all Blazorise packages.**
**Replace BlazorLeptonXLiteThemeBundles with BlazorAntDesignThemeBundles**
**Open `_Imports.razor` and add with the following:**
```csharp
@using AntDesign
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Bundling
```
**Open `BookStoreWebAppBlazorModule` make the following changes:**
* Remove the `ConfigureBlazorise` method
* Fix wrong using namespace
* Update module dependencies
* For example: replace `AbpIdentityBlazorServerModule` with `AbpIdentityBlazorServerAntDesignModule`
* For example: replace `AbpAspNetCoreComponentsServerLeptonXLiteThemeModule` with `AbpAspNetCoreComponentsServerAntDesignThemeModule`
**Open `BookStoreWebAppBlazorClientModule` make the following changes:**
* Remove the `ConfigureBlazorise` method
* Fix wrong using namespace
* Update module dependencies
* For example: replace `AbpIdentityBlazorWebAssemblyModule` with `AbpIdentityBlazorWebAssemblyAntDesignModule`
* For example: replace `AbpAspNetCoreComponentsWebAssemblyLeptonXLiteThemeModule` with `AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule`
**Open `BookStoreMenuContributor` to update icon:**
* `"fas fa-home"` to `IconType.Outline.Home`
* `"fa fa-cog"` to `IconType.Outline.Setting`
**Open `Routes.razor` and replace with the following:**
```csharp
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Themes.AntDesignTheme
@using Microsoft.Extensions.Options
@inject IOptions<AbpRouterOptions> RouterOptions
<Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies="RouterOptions.Value.AdditionalAssemblies">
<Found Context="routeData">
<AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(DefaultLayout)">
<NotAuthorized>
<RedirectToLogin />
</NotAuthorized>
</AuthorizeRouteView>
</Found>
</Router>
```
**Open `Index.razor` and replace with the following:**
```csharp
@page "/"
@inherits BookStoreWebAppComponentBase
<AbpPageHeader Title="Index"></AbpPageHeader>
<div class="page-content">
<div style="text-align: center">
<Alert Type="@AlertType.Success"
Message="Success"
Description=" Congratulations, BookStore is successfully running!"
ShowIcon="true"/>
<Divider/>
</div>
</div>
```
Run the `dotnet build` & `abp bundle` command in the `BookStoreWebApp.Blazor.Client` folder.
That's all, enjoy your code :).
![3](img/3.png)

68
README.md

@ -7,77 +7,17 @@
## Samples ## Samples
Check the [samples](/samples/BookStore/) [BLazor WebAssembly and Blazor server samples](/samples/BookStore/)
[Blazor WebApp sample](/samples/BookStoreWebApp/)
![1](img/1.png) ![1](img/1.png)
![2](img/2.png) ![2](img/2.png)
## Quick Start ## Quick Start
The first step is to use ABP CLI to create a new project. [Change the theme of the ABP project to AntBlazorTheme for Blazor WebApp.](./README.WebApp.md)
`abp new BookStore -u blazor` [Change the theme of the ABP project to AntBlazorTheme for Blazor.](./README.Blazor.md)
> See the [ABP official documentation](https://docs.abp.io) to learn [ABP framework](https://github.com/abpframework/abp).
**Replace LeptonXLiteTheme with AntBlazorTheme packages**
* Remove `Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme` Package.
* 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`
```
**Open `_Imports.razor` and add with the following:**
```csharp
@using AntDesign
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout
```
**Open `BookStoreBlazorModule` make the following changes:**
* Remove the `ConfigureBlazorise` method
* Fix wrong using namespace
* Update module dependencies
* For example, replace `AbpIdentityBlazorWebAssemblyModule` with `AbpIdentityBlazorWebAssemblyAntDesignModule`
**Open `BookStoreMenuContributor` to update icon:**
* `"fas fa-home"` to `IconType.Outline.Home`
* `"fa fa-cog"` to `IconType.Outline.Setting`
**Open `Index.razor` and replace with the following:**
```csharp
@page "/"
@inherits BookStoreComponentBase
<AbpPageHeader Title="Index"></AbpPageHeader>
<div class="page-content">
<div style="text-align: center">
<Alert Type="@AlertType.Success"
Message="Success"
Description=" Congratulations, BookStore is successfully running!"
ShowIcon="true"/>
<Divider/>
</div>
</div>
```
Run the `dotnet build` & `abp bundle` command in the `BookStore.Blazor` folder.
That's all, enjoy your code :).
![3](img/3.png)
## Road map ## Road map

4
common.props

@ -1,13 +1,13 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<Version>0.9.4</Version> <Version>0.9.5</Version>
<PackageIconUrl>https://raw.githubusercontent.com/realliangshiwei/Lsw.Abp.AntDesignUI/main/icon.png</PackageIconUrl> <PackageIconUrl>https://raw.githubusercontent.com/realliangshiwei/Lsw.Abp.AntDesignUI/main/icon.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/realLiangshiwei/Lsw.Abp.AntDesignUI</PackageProjectUrl> <PackageProjectUrl>https://github.com/realLiangshiwei/Lsw.Abp.AntDesignUI</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression> <PackageLicenseExpression>MIT</PackageLicenseExpression>
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/realLiangshiwei/Lsw.Abp.AntDesignUI</RepositoryUrl> <RepositoryUrl>https://github.com/realLiangshiwei/Lsw.Abp.AntDesignUI</RepositoryUrl>
<ABPPackageVersion>8.2.*-*</ABPPackageVersion> <ABPPackageVersion>8.2.*-*</ABPPackageVersion>
<MicrosoftPackageVersion>8.0.*</MicrosoftPackageVersion> <MicrosoftPackageVersion>8.0.4</MicrosoftPackageVersion>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

BIN
samples/.DS_Store

Binary file not shown.

BIN
samples/BookStoreWebApp/.DS_Store

Binary file not shown.

1
samples/BookStoreWebApp/.gitattributes

@ -0,0 +1 @@
**/wwwroot/libs/** linguist-vendored

265
samples/BookStoreWebApp/.gitignore

@ -0,0 +1,265 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# BookStoreWebApp
src/BookStoreWebApp.Web/Logs/*
src/BookStoreWebApp.Web.Host/Logs/*
src/BookStoreWebApp.AuthServer/Logs/*
src/BookStoreWebApp.HttpApi.Host/Logs/*
src/BookStoreWebApp.HttpApi.HostWithIds/Logs/*
src/BookStoreWebApp.DbMigrator/Logs/*
src/BookStoreWebApp.Blazor.Server/Logs/*
src/BookStoreWebApp.Blazor.Server.Tiered/Logs/*
# Use abp install-libs to restore.
**/wwwroot/libs/*

5
samples/BookStoreWebApp/.prettierrc

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

130
samples/BookStoreWebApp/BookStoreWebApp.sln

@ -0,0 +1,130 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.Domain", "src\BookStoreWebApp.Domain\BookStoreWebApp.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.Application", "src\BookStoreWebApp.Application\BookStoreWebApp.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.Application.Tests", "test\BookStoreWebApp.Application.Tests\BookStoreWebApp.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.MongoDB", "src\BookStoreWebApp.MongoDB\BookStoreWebApp.MongoDB.csproj", "{E3444355-D47E-431E-BDD0-DD3A7113B2AE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.Domain.Shared", "src\BookStoreWebApp.Domain.Shared\BookStoreWebApp.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.Application.Contracts", "src\BookStoreWebApp.Application.Contracts\BookStoreWebApp.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.HttpApi", "src\BookStoreWebApp.HttpApi\BookStoreWebApp.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.HttpApi.Client", "src\BookStoreWebApp.HttpApi.Client\BookStoreWebApp.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.TestBase", "test\BookStoreWebApp.TestBase\BookStoreWebApp.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.Domain.Tests", "test\BookStoreWebApp.Domain.Tests\BookStoreWebApp.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.MongoDB.Tests", "test\BookStoreWebApp.MongoDB.Tests\BookStoreWebApp.MongoDB.Tests.csproj", "{6015D17B-104B-4EC2-A9B7-D8A40C891458}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.HttpApi.Client.ConsoleTestApp", "test\BookStoreWebApp.HttpApi.Client.ConsoleTestApp\BookStoreWebApp.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BookStoreWebApp.DbMigrator", "src\BookStoreWebApp.DbMigrator\BookStoreWebApp.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStoreWebApp.Blazor", "src\BookStoreWebApp.Blazor\BookStoreWebApp.Blazor.csproj", "{14882ABF-1EEF-430C-8E72-812B3EE810C4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookStoreWebApp.Blazor.Client", "src\BookStoreWebApp.Blazor.Client\BookStoreWebApp.Blazor.Client.csproj", "{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
{E3444355-D47E-431E-BDD0-DD3A7113B2AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3444355-D47E-431E-BDD0-DD3A7113B2AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3444355-D47E-431E-BDD0-DD3A7113B2AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3444355-D47E-431E-BDD0-DD3A7113B2AE}.Release|Any CPU.Build.0 = Release|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
{6015D17B-104B-4EC2-A9B7-D8A40C891458}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6015D17B-104B-4EC2-A9B7-D8A40C891458}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6015D17B-104B-4EC2-A9B7-D8A40C891458}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6015D17B-104B-4EC2-A9B7-D8A40C891458}.Release|Any CPU.Build.0 = Release|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU
{14882ABF-1EEF-430C-8E72-812B3EE810C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14882ABF-1EEF-430C-8E72-812B3EE810C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14882ABF-1EEF-430C-8E72-812B3EE810C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14882ABF-1EEF-430C-8E72-812B3EE810C4}.Release|Any CPU.Build.0 = Release|Any CPU
{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{648460F4-3ECC-4751-9D87-EE25D0B8B2BF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{E3444355-D47E-431E-BDD0-DD3A7113B2AE} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{6015D17B-104B-4EC2-A9B7-D8A40C891458} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{14882ABF-1EEF-430C-8E72-812B3EE810C4} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{648460F4-3ECC-4751-9D87-EE25D0B8B2BF} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C09128AF-C73F-ED7D-33F5-69BF7D934D50}
EndGlobalSection
EndGlobal

23
samples/BookStoreWebApp/BookStoreWebApp.sln.DotSettings

@ -0,0 +1,23 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceDoWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceFixedStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForeachStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceIfStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceLockStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceUsingStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">Required</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_REDUNDANT/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Implementations/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Overrides/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String>
</wpf:ResourceDictionary>

5
samples/BookStoreWebApp/NuGet.Config

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
</packageSources>
</configuration>

66
samples/BookStoreWebApp/README.md

@ -0,0 +1,66 @@
# BookStoreWebApp
## About this solution
This is a layered startup solution based on [Domain Driven Design (DDD)](https://docs.abp.io/en/abp/latest/Domain-Driven-Design) practises. All the fundamental ABP modules are already installed.
### Pre-requirements
* [.NET 8.0+ SDK](https://dotnet.microsoft.com/download/dotnet)
* [Node v18 or 20](https://nodejs.org/en)
### Configurations
The solution comes with a default configuration that works out of the box. However, you may consider to change the following configuration before running your solution:
### Before running the application
#### Generating a Signing Certificate
In the production environment, you need to use a production signing certificate. ABP Framework sets up signing and encryption certificates in your application and expects an `openiddict.pfx` file in your application.
This certificate is already generated by ABP CLI, so most of the time you don't need to generate it yourself. However, if you need to generate a certificate, you can use the following command:
```bash
dotnet dev-certs https -v -ep openiddict.pfx -p 4a4461cf-98c8-4315-a9d7-7650423f4fe5
```
> `4a4461cf-98c8-4315-a9d7-7650423f4fe5` is the password of the certificate, you can change it to any password you want.
It is recommended to use **two** RSA certificates, distinct from the certificate(s) used for HTTPS: one for encryption, one for signing.
For more information, please refer to: https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html#registering-a-certificate-recommended-for-production-ready-scenarios
> Also, see the [Configuring OpenIddict](https://docs.abp.io/en/abp/latest/Deployment/Configuring-OpenIddict#production-environment) documentation for more information.
#### Install Client-Side Libraries
Run the following command in the directory of your final application:
```bash
abp install-libs
```
> This command installs all NPM packages for MVC/Razor Pages and Blazor Server UIs and this command is already run by the ABP CLI, so most of the time you don't need to run this command manually.
#### Create the Database
Run `BookStoreWebApp.DbMigrator` to create the initial database. This should be done in the first run. It is also needed if a new database migration is added to the solution later.
### Solution structure
This is a layered monolith application that consists of the following applications:
* `BookStoreWebApp.DbMigrator`: A console application which applies the migrations and also seeds the initial data. It is useful on development as well as on production environment.
### Deploying the application
Deploying an ABP application is not different than deploying any .NET or ASP.NET Core application. However, there are some topics that you should care about when you are deploying your applications. You can check ABP's [Deployment documentation](https://docs.abp.io/en/abp/latest/Deployment/Index) before deploying your application.
### Additional resources
You can see the following resources to learn more about your solution and the ABP Framework:
* [Web Application Development Tutorial](https://docs.abp.io/en/abp/latest/Tutorials/Part-1)
* [Application Startup Template Structure](https://docs.abp.io/en/abp/latest/Startup-Templates/Application)

19
samples/BookStoreWebApp/common.props

@ -0,0 +1,19 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<AbpProjectType>app</AbpProjectType>
</PropertyGroup>
<Target Name="NoWarnOnRazorViewImportedTypeConflicts" BeforeTargets="RazorCoreCompile">
<PropertyGroup>
<NoWarn>$(NoWarn);0436</NoWarn>
</PropertyGroup>
</Target>
<ItemGroup>
<Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*" />
</ItemGroup>
</Project>

25
samples/BookStoreWebApp/src/BookStoreWebApp.Application.Contracts/BookStoreWebApp.Application.Contracts.csproj

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>BookStoreWebApp</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\BookStoreWebApp.Domain.Shared\BookStoreWebApp.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.ObjectExtending" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="8.2.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="8.2.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="8.2.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="8.2.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" Version="8.2.0" />
</ItemGroup>
</Project>

28
samples/BookStoreWebApp/src/BookStoreWebApp.Application.Contracts/BookStoreWebAppApplicationContractsModule.cs

@ -0,0 +1,28 @@
using Volo.Abp.Account;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
namespace BookStoreWebApp;
[DependsOn(
typeof(BookStoreWebAppDomainSharedModule),
typeof(AbpAccountApplicationContractsModule),
typeof(AbpFeatureManagementApplicationContractsModule),
typeof(AbpIdentityApplicationContractsModule),
typeof(AbpPermissionManagementApplicationContractsModule),
typeof(AbpSettingManagementApplicationContractsModule),
typeof(AbpTenantManagementApplicationContractsModule),
typeof(AbpObjectExtendingModule)
)]
public class BookStoreWebAppApplicationContractsModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
BookStoreWebAppDtoExtensions.Configure();
}
}

28
samples/BookStoreWebApp/src/BookStoreWebApp.Application.Contracts/BookStoreWebAppDtoExtensions.cs

@ -0,0 +1,28 @@
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace BookStoreWebApp;
public static class BookStoreWebAppDtoExtensions
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
/* You can add extension properties to DTOs
* defined in the depended modules.
*
* Example:
*
* ObjectExtensionManager.Instance
* .AddOrUpdateProperty<IdentityRoleDto, string>("Title");
*
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Object-Extensions
*/
});
}
}

20
samples/BookStoreWebApp/src/BookStoreWebApp.Application.Contracts/Permissions/BookStoreWebAppPermissionDefinitionProvider.cs

@ -0,0 +1,20 @@
using BookStoreWebApp.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
namespace BookStoreWebApp.Permissions;
public class BookStoreWebAppPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var myGroup = context.AddGroup(BookStoreWebAppPermissions.GroupName);
//Define your own permissions here. Example:
//myGroup.AddPermission(BookStoreWebAppPermissions.MyPermission1, L("Permission:MyPermission1"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<BookStoreWebAppResource>(name);
}
}

9
samples/BookStoreWebApp/src/BookStoreWebApp.Application.Contracts/Permissions/BookStoreWebAppPermissions.cs

@ -0,0 +1,9 @@
namespace BookStoreWebApp.Permissions;
public static class BookStoreWebAppPermissions
{
public const string GroupName = "BookStoreWebApp";
//Add your own permission names. Example:
//public const string MyPermission1 = GroupName + ".MyPermission1";
}

25
samples/BookStoreWebApp/src/BookStoreWebApp.Application/BookStoreWebApp.Application.csproj

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>BookStoreWebApp</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\BookStoreWebApp.Domain\BookStoreWebApp.Domain.csproj" />
<ProjectReference Include="..\BookStoreWebApp.Application.Contracts\BookStoreWebApp.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="8.2.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Application" Version="8.2.0" />
</ItemGroup>
</Project>

17
samples/BookStoreWebApp/src/BookStoreWebApp.Application/BookStoreWebAppAppService.cs

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;
using BookStoreWebApp.Localization;
using Volo.Abp.Application.Services;
namespace BookStoreWebApp;
/* Inherit your application services from this class.
*/
public abstract class BookStoreWebAppAppService : ApplicationService
{
protected BookStoreWebAppAppService()
{
LocalizationResource = typeof(BookStoreWebAppResource);
}
}

13
samples/BookStoreWebApp/src/BookStoreWebApp.Application/BookStoreWebAppApplicationAutoMapperProfile.cs

@ -0,0 +1,13 @@
using AutoMapper;
namespace BookStoreWebApp;
public class BookStoreWebAppApplicationAutoMapperProfile : Profile
{
public BookStoreWebAppApplicationAutoMapperProfile()
{
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
}
}

31
samples/BookStoreWebApp/src/BookStoreWebApp.Application/BookStoreWebAppApplicationModule.cs

@ -0,0 +1,31 @@
using Volo.Abp.Account;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
namespace BookStoreWebApp;
[DependsOn(
typeof(BookStoreWebAppDomainModule),
typeof(AbpAccountApplicationModule),
typeof(BookStoreWebAppApplicationContractsModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpTenantManagementApplicationModule),
typeof(AbpFeatureManagementApplicationModule),
typeof(AbpSettingManagementApplicationModule)
)]
public class BookStoreWebAppApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BookStoreWebAppApplicationModule>();
});
}
}

2
samples/BookStoreWebApp/src/BookStoreWebApp.Application/Properties/AssemblyInfo.cs

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

45
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebApp.Blazor.Client.csproj

@ -0,0 +1,45 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BlazorWebAssemblyLoadAllGlobalizationData>true</BlazorWebAssemblyLoadAllGlobalizationData>
<RootNamespace>BookStoreWebApp.Blazor.Client</RootNamespace>
</PropertyGroup>
<ItemGroup>
<!-- <PackageReference Include="Blazorise.Bootstrap5" Version="1.5.2" />-->
<!-- <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.5.2" />-->
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.4" />
</ItemGroup>
<ItemGroup>
<!-- <PackageReference Include="Volo.Abp.AspNetCore.Components.WebAssembly.LeptonXLiteTheme" Version="3.2.0" /> -->
<PackageReference Include="Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme" Version="0.9.5" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac.WebAssembly" Version="8.2.0" />
</ItemGroup>
<!-- <ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Blazor.WebAssembly" Version="8.2.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Blazor.WebAssembly" Version="8.2.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Blazor.WebAssembly" Version="8.2.0" />
</ItemGroup> -->
<ItemGroup>
<PackageReference Include="Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI" Version="0.9.5" />
<PackageReference Include="Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI" Version="0.9.5" />
<PackageReference Include="Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI" Version="0.9.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\BookStoreWebApp.HttpApi.Client\BookStoreWebApp.HttpApi.Client.csproj" />
</ItemGroup>
</Project>

11
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebAppBlazorAutoMapperProfile.cs

@ -0,0 +1,11 @@
using AutoMapper;
namespace BookStoreWebApp.Blazor.Client;
public class BookStoreWebAppBlazorAutoMapperProfile : Profile
{
public BookStoreWebAppBlazorAutoMapperProfile()
{
//Define your AutoMapper configuration here for the Blazor project.
}
}

102
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebAppBlazorClientModule.cs

@ -0,0 +1,102 @@
using System;
using System.Net.Http;
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using BookStoreWebApp.Blazor.Client.Menus;
using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing;
using Lsw.Abp.AspnetCore.Components.WebAssembly.AntDesignTheme;
using Lsw.Abp.IdentityManagement.Blazor.WebAssembly.AntDesignUI;
using Lsw.Abp.SettingManagement.Blazor.WebAssembly.AntDesignUI;
using Lsw.Abp.TenantManagement.Blazor.WebAssembly.AntDesignUI;
using Volo.Abp.AspNetCore.Components.Web;
using Volo.Abp.Autofac.WebAssembly;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.UI.Navigation;
namespace BookStoreWebApp.Blazor.Client;
[DependsOn(
typeof(AbpAutofacWebAssemblyModule),
typeof(BookStoreWebAppHttpApiClientModule),
// typeof(AbpAspNetCoreComponentsWebAssemblyLeptonXLiteThemeModule),
// typeof(AbpIdentityBlazorWebAssemblyModule),
// typeof(AbpTenantManagementBlazorWebAssemblyModule),
// typeof(AbpSettingManagementBlazorWebAssemblyModule)
typeof(AbpAspNetCoreComponentsWebAssemblyAntDesignThemeModule),
typeof(AbpIdentityBlazorWebAssemblyAntDesignModule),
typeof(AbpTenantManagementBlazorWebAssemblyAntDesignModule),
typeof(AbpSettingManagementBlazorWebAssemblyAntDesignModule)
)]
public class BookStoreWebAppBlazorClientModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<AbpAspNetCoreComponentsWebOptions>(options =>
{
options.IsBlazorWebApp = true;
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var environment = context.Services.GetSingletonInstance<IWebAssemblyHostEnvironment>();
var builder = context.Services.GetSingletonInstance<WebAssemblyHostBuilder>();
ConfigureAuthentication(builder);
ConfigureHttpClient(context, environment);
//ConfigureBlazorise(context);
ConfigureRouter(context);
ConfigureMenu(context);
ConfigureAutoMapper(context);
}
private void ConfigureRouter(ServiceConfigurationContext context)
{
Configure<AbpRouterOptions>(options =>
{
options.AppAssembly = typeof(BookStoreWebAppBlazorClientModule).Assembly;
options.AdditionalAssemblies.Add(typeof(BookStoreWebAppBlazorClientModule).Assembly);
});
}
private void ConfigureMenu(ServiceConfigurationContext context)
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new BookStoreWebAppMenuContributor(context.Services.GetConfiguration()));
});
}
// private void ConfigureBlazorise(ServiceConfigurationContext context)
// {
// context.Services
// .AddBootstrap5Providers()
// .AddFontAwesomeIcons();
// }
private static void ConfigureAuthentication(WebAssemblyHostBuilder builder)
{
//TODO: Remove SignOutSessionStateManager in new version.
builder.Services.TryAddScoped<SignOutSessionStateManager>();
builder.Services.AddBlazorWebAppServices();
}
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<BookStoreWebAppBlazorClientModule>();
});
}
}

10
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebAppBrandingProvider.cs

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

19
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebAppBundleContributor.cs

@ -0,0 +1,19 @@
using Volo.Abp.Bundling;
namespace BookStoreWebApp.Blazor.Client;
/* 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 BookStoreWebAppBundleContributor : IBundleContributor
{
public void AddScripts(BundleContext context)
{
}
public void AddStyles(BundleContext context)
{
context.Add("main.css", true);
}
}

12
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/BookStoreWebAppComponentBase.cs

@ -0,0 +1,12 @@
using BookStoreWebApp.Localization;
using Volo.Abp.AspNetCore.Components;
namespace BookStoreWebApp.Blazor.Client;
public abstract class BookStoreWebAppComponentBase : AbpComponentBase
{
protected BookStoreWebAppComponentBase()
{
LocalizationResource = typeof(BookStoreWebAppResource);
}
}

89
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Menus/BookStoreWebAppMenuContributor.cs

@ -0,0 +1,89 @@
using System;
using System.Threading.Tasks;
using AntDesign;
using Microsoft.Extensions.Configuration;
using BookStoreWebApp.Localization;
using BookStoreWebApp.MultiTenancy;
using Lsw.Abp.IdentityManagement.Blazor.AntDesignUI;
using Lsw.Abp.SettingManagement.Blazor.AntDesignUI;
using Lsw.Abp.TenantManagement.Blazor.AntDesignUI;
using Volo.Abp.Account.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.UI.Navigation;
namespace BookStoreWebApp.Blazor.Client.Menus;
public class BookStoreWebAppMenuContributor : IMenuContributor
{
private readonly IConfiguration _configuration;
public BookStoreWebAppMenuContributor(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<BookStoreWebAppResource>();
context.Menu.Items.Insert(
0,
new ApplicationMenuItem(
BookStoreWebAppMenus.Home,
l["Menu:Home"],
"/",
icon: IconType.Outline.Home
)
);
var administration = context.Menu.GetAdministration();
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;
}
private Task ConfigureUserMenuAsync(MenuConfigurationContext context)
{
if (!OperatingSystem.IsBrowser())
{
return Task.CompletedTask;
}
var authServerUrl = _configuration["AuthServer:Authority"] ?? "";
var accountStringLocalizer = context.GetLocalizer<AccountResource>();
context.Menu.AddItem(new ApplicationMenuItem(
"Account.Manage",
accountStringLocalizer["MyAccount"],
$"{authServerUrl.EnsureEndsWith('/')}Account/Manage",
icon: IconType.Outline.Setting,
order: 1000,
target: "_blank")
.RequireAuthenticated());
return Task.CompletedTask;
}
}

10
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Menus/BookStoreWebAppMenus.cs

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

17
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Pages/Index.razor

@ -0,0 +1,17 @@
@page "/"
@inherits BookStoreWebAppComponentBase
<AbpPageHeader Title="Index"></AbpPageHeader>
<div class="page-content">
<div style="text-align: center">
<Alert Type="@AlertType.Success"
Message="Success"
Description=" Congratulations, BookStore is successfully running!"
ShowIcon="true"/>
<Divider/>
</div>
</div>

6
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Pages/Index.razor.cs

@ -0,0 +1,6 @@
namespace BookStoreWebApp.Blazor.Client.Pages;
public partial class Index
{
}

1
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Pages/Index.razor.css

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

22
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Program.cs

@ -0,0 +1,22 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
namespace BookStoreWebApp.Blazor.Client;
public class Program
{
public async static Task Main(string[] args)
{
var builder = WebAssemblyHostBuilder.CreateDefault(args);
var application = await builder.AddApplicationAsync<BookStoreWebAppBlazorClientModule>(options =>
{
options.UseAutofac();
});
var host = builder.Build();
await application.InitializeApplicationAsync(host.Services);
await host.RunAsync();
}
}

13
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/Routes.razor

@ -0,0 +1,13 @@
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Routing
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Themes.AntDesignTheme
@using Microsoft.Extensions.Options
@inject IOptions<AbpRouterOptions> RouterOptions
<Router AppAssembly="typeof(Program).Assembly" AdditionalAssemblies="RouterOptions.Value.AdditionalAssemblies">
<Found Context="routeData">
<AuthorizeRouteView RouteData="routeData" DefaultLayout="typeof(DefaultLayout)">
<NotAuthorized>
<RedirectToLogin />
</NotAuthorized>
</AuthorizeRouteView>
</Found>
</Router>

18
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/_Imports.razor

@ -0,0 +1,18 @@
@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 static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.JSInterop
@using Volo.Abp.AspNetCore.Components.Web
@* @using Blazorise *@
@* @using Blazorise.DataGrid *@
@* @using Volo.Abp.BlazoriseUI *@
@* @using Volo.Abp.BlazoriseUI.Components *@
@using AntDesign
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout

3
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/appsettings.Development.json

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

18
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/appsettings.json

@ -0,0 +1,18 @@
{
"RemoteServices": {
"Default": {
"BaseUrl": "https://localhost:44390"
}
},
"AbpCli": {
"Bundle": {
"Mode": "BundleAndMinify", /* Options: None, Bundle, BundleAndMinify */
"Name": "global",
"IsBlazorWebApp": true,
"InteractiveAuto": true,
"Parameters": {
}
}
}
}

2
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/appsettings.secrets.json

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

2
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/global.css

File diff suppressed because one or more lines are too long

11
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/global.js

File diff suppressed because one or more lines are too long

BIN
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/icon-192.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/icon-512.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

55
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/main.css

@ -0,0 +1,55 @@
/* Global styles for the BookStoreWebApp application */
:root .lpx-brand-logo {
--lpx-logo: url('/images/logo/leptonx/logo-light.png');
--lpx-logo-icon: url('/images/logo/leptonx/logo-light-thumbnail.png');
}
.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);
}
}

21
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/manifest.json

@ -0,0 +1,21 @@
{
"name": "BookStoreWebApp",
"short_name": "BookStoreWebApp",
"start_url": "./",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#03173d",
"prefer_related_applications": false,
"icons": [
{
"src": "icon-512.png",
"type": "image/png",
"sizes": "512x512"
},
{
"src": "icon-192.png",
"type": "image/png",
"sizes": "192x192"
}
]
}

4
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/service-worker.js

@ -0,0 +1,4 @@
// In development, always fetch from the network and do not enable offline support.
// This is because caching would make development more difficult (changes would not
// be reflected on the first load after each change).
self.addEventListener('fetch', () => { });

48
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor.Client/wwwroot/service-worker.published.js

@ -0,0 +1,48 @@
// Caution! Be sure you understand the caveats before publishing an application with
// offline support. See https://aka.ms/blazor-offline-considerations
self.importScripts('./service-worker-assets.js');
self.addEventListener('install', event => event.waitUntil(onInstall(event)));
self.addEventListener('activate', event => event.waitUntil(onActivate(event)));
self.addEventListener('fetch', event => event.respondWith(onFetch(event)));
const cacheNamePrefix = 'offline-cache-';
const cacheName = `${cacheNamePrefix}${self.assetsManifest.version}`;
const offlineAssetsInclude = [ /\.dll$/, /\.pdb$/, /\.wasm/, /\.html/, /\.js$/, /\.json$/, /\.css$/, /\.woff$/, /\.png$/, /\.jpe?g$/, /\.gif$/, /\.ico$/, /\.blat$/, /\.dat$/ ];
const offlineAssetsExclude = [ /^service-worker\.js$/ ];
async function onInstall(event) {
console.info('Service worker: Install');
// Fetch and cache all matching items from the assets manifest
const assetsRequests = self.assetsManifest.assets
.filter(asset => offlineAssetsInclude.some(pattern => pattern.test(asset.url)))
.filter(asset => !offlineAssetsExclude.some(pattern => pattern.test(asset.url)))
.map(asset => new Request(asset.url, { integrity: asset.hash, cache: 'no-cache' }));
await caches.open(cacheName).then(cache => cache.addAll(assetsRequests));
}
async function onActivate(event) {
console.info('Service worker: Activate');
// Delete unused caches
const cacheKeys = await caches.keys();
await Promise.all(cacheKeys
.filter(key => key.startsWith(cacheNamePrefix) && key !== cacheName)
.map(key => caches.delete(key)));
}
async function onFetch(event) {
let cachedResponse = null;
if (event.request.method === 'GET') {
// For all navigation requests, try to serve index.html from cache
// If you need some URLs to be server-rendered, edit the following check to exclude those URLs
const shouldServeIndexHtml = event.request.mode === 'navigate';
const request = shouldServeIndexHtml ? 'index.html' : event.request;
const cache = await caches.open(cacheName);
cachedResponse = await cache.match(request);
}
return cachedResponse || fetch(event.request);
}

74
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/BookStoreWebApp.Blazor.csproj

@ -0,0 +1,74 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>BookStoreWebApp-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
<RootNamespace>BookStoreWebApp.Blazor</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.4" />
<!-- <PackageReference Include="Blazorise.Bootstrap5" Version="1.5.2" />-->
<!-- <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.5.2" />-->
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
</ItemGroup>
<ItemGroup>
<!-- <PackageReference Include="Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme" Version="3.2.0" /> -->
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite" Version="3.2.0" />
<PackageReference Include="Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme" Version="0.9.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BookStoreWebApp.Application\BookStoreWebApp.Application.csproj" />
<ProjectReference Include="..\BookStoreWebApp.Blazor.Client\BookStoreWebApp.Blazor.Client.csproj" />
<ProjectReference Include="..\BookStoreWebApp.HttpApi\BookStoreWebApp.HttpApi.csproj" />
<ProjectReference Include="..\BookStoreWebApp.MongoDB\BookStoreWebApp.MongoDB.csproj" />
<PackageReference Include="Volo.Abp.Autofac" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Swashbuckle" Version="8.2.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="8.2.0" />
<PackageReference Include="Volo.Abp.Account.Web.OpenIddict" Version="8.2.0" />
<!-- <PackageReference Include="Volo.Abp.Identity.Blazor.Server" Version="8.2.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Blazor.Server" Version="8.2.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Blazor.Server" Version="8.2.0" /> -->
<PackageReference Include="Lsw.Abp.IdentityManagement.Blazor.Server.AntDesignUI" Version="0.9.5" />
<PackageReference Include="Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI" Version="0.9.5" />
<PackageReference Include="Lsw.Abp.SettingManagement.Blazor.Server.AntDesignUI" Version="0.9.5" />
</ItemGroup>
<ItemGroup Condition="Exists('./openiddict.pfx')">
<None Remove="openiddict.pfx" />
<EmbeddedResource Include="openiddict.pfx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
</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>

284
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/BookStoreWebAppBlazorModule.cs

@ -0,0 +1,284 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Microsoft.OpenApi.Models;
using BookStoreWebApp.Blazor.Client;
using BookStoreWebApp.Blazor.Client.Menus;
using BookStoreWebApp.Blazor.Components;
using BookStoreWebApp.MongoDB;
using BookStoreWebApp.Localization;
using BookStoreWebApp.MultiTenancy;
using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme;
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.SettingManagement.Blazor.Server.AntDesignUI;
using Lsw.Abp.TenantManagement.Blazor.Server.AntDesignUI;
using OpenIddict.Validation.AspNetCore;
using Volo.Abp;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Components.Web;
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.LeptonXLite;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.Bundling;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict;
using Volo.Abp.Security.Claims;
using Volo.Abp.Swashbuckle;
using Volo.Abp.UI.Navigation;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.VirtualFileSystem;
namespace BookStoreWebApp.Blazor;
[DependsOn(
typeof(BookStoreWebAppApplicationModule),
typeof(BookStoreWebAppMongoDbModule),
typeof(BookStoreWebAppHttpApiModule),
typeof(AbpAutofacModule),
typeof(AbpSwashbuckleModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAccountWebOpenIddictModule),
//typeof(AbpAspNetCoreComponentsServerLeptonXLiteThemeModule),
typeof(AbpAspNetCoreComponentsServerAntDesignThemeModule),
typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule),
// typeof(AbpIdentityBlazorServerModule),
// typeof(AbpTenantManagementBlazorServerModule),
// typeof(AbpSettingManagementBlazorServerModule)
typeof(AbpIdentityBlazorServerAntDesignModule),
typeof(AbpTenantManagementBlazorServerAntDesignModule),
typeof(AbpSettingManagementBlazorServerAntDesignModule)
)]
public class BookStoreWebAppBlazorModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(
typeof(BookStoreWebAppResource),
typeof(BookStoreWebAppDomainModule).Assembly,
typeof(BookStoreWebAppDomainSharedModule).Assembly,
typeof(BookStoreWebAppApplicationModule).Assembly,
typeof(BookStoreWebAppApplicationContractsModule).Assembly,
typeof(BookStoreWebAppBlazorModule).Assembly
);
});
PreConfigure<OpenIddictBuilder>(builder =>
{
builder.AddValidation(options =>
{
options.AddAudiences("BookStoreWebApp");
options.UseLocalServer();
options.UseAspNetCore();
});
});
if (!hostingEnvironment.IsDevelopment())
{
PreConfigure<AbpOpenIddictAspNetCoreOptions>(options =>
{
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});
PreConfigure<OpenIddictServerBuilder>(serverBuilder =>
{
serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "4a4461cf-98c8-4315-a9d7-7650423f4fe5");
});
}
PreConfigure<AbpAspNetCoreComponentsWebOptions>(options =>
{
options.IsBlazorWebApp = true;
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
// Add services to the container.
context.Services.AddRazorComponents()
.AddInteractiveServerComponents()
.AddInteractiveWebAssemblyComponents();
ConfigureAuthentication(context);
ConfigureUrls(configuration);
ConfigureBundles();
ConfigureAutoMapper();
ConfigureVirtualFileSystem(hostingEnvironment);
ConfigureSwaggerServices(context.Services);
ConfigureAutoApiControllers();
//ConfigureBlazorise(context);
ConfigureRouter(context);
ConfigureMenu(context);
}
private void ConfigureAuthentication(ServiceConfigurationContext context)
{
context.Services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme);
context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
{
options.IsDynamicClaimsEnabled = true;
});
}
private void ConfigureUrls(IConfiguration configuration)
{
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"]?.Split(',') ?? Array.Empty<string>());
});
}
private void ConfigureBundles()
{
Configure<AbpBundlingOptions>(options =>
{
// MVC UI
options.StyleBundles.Configure(
LeptonXLiteThemeBundles.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(new BundleFile("/BookStoreWebApp.Blazor.Client.styles.css", true));
}
);
});
}
private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment)
{
if (hostingEnvironment.IsDevelopment())
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreWebAppDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}BookStoreWebApp.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreWebAppDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}BookStoreWebApp.Domain"));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreWebAppApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}BookStoreWebApp.Application.Contracts"));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreWebAppApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}BookStoreWebApp.Application"));
options.FileSets.ReplaceEmbeddedByPhysical<BookStoreWebAppBlazorModule>(hostingEnvironment.ContentRootPath);
});
}
}
private void ConfigureSwaggerServices(IServiceCollection services)
{
services.AddAbpSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "BookStoreWebApp 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 BookStoreWebAppMenuContributor(context.Services.GetConfiguration()));
});
}
private void ConfigureRouter(ServiceConfigurationContext context)
{
Configure<AbpRouterOptions>(options =>
{
options.AppAssembly = typeof(BookStoreWebAppBlazorModule).Assembly;
options.AdditionalAssemblies.Add(typeof(BookStoreWebAppBlazorClientModule).Assembly);
});
}
private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(BookStoreWebAppApplicationModule).Assembly);
});
}
private void ConfigureAutoMapper()
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<BookStoreWebAppBlazorModule>();
});
}
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.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAbpOpenIddictValidation();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseDynamicClaims();
app.UseAntiforgery();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "BookStoreWebApp API");
});
app.UseConfiguredEndpoints(builder =>
{
builder.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(builder.ServiceProvider.GetRequiredService<IOptions<AbpRouterOptions>>().Value.AdditionalAssemblies.ToArray());
});
}
}

10
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/BookStoreWebAppBrandingProvider.cs

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

12
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/BookStoreWebAppComponentBase.cs

@ -0,0 +1,12 @@
using BookStoreWebApp.Localization;
using Volo.Abp.AspNetCore.Components;
namespace BookStoreWebApp.Blazor;
public abstract class BookStoreWebAppComponentBase : AbpComponentBase
{
protected BookStoreWebAppComponentBase()
{
LocalizationResource = typeof(BookStoreWebAppResource);
}
}

59
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/Components/App.razor

@ -0,0 +1,59 @@
@using Volo.Abp.Localization
@using System.Globalization
@using Lsw.Abp.AspnetCore.Components.Server.AntDesignTheme.Bundling
@using Microsoft.Extensions.Hosting
@inject IHostEnvironment Env
@{
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>BookStoreWebApp.Blazor.Server</title>
<base href="/" />
<AbpStyles BundleName="@BlazorAntDesignThemeBundles.Styles.Global" WebAssemblyStyleFiles="GlobalStyles" @rendermode="InteractiveAuto" />
<HeadOutlet @rendermode="InteractiveAuto" />
</head>
<body>
<Routes @rendermode="InteractiveAuto" />
<AbpScripts BundleName="@BlazorAntDesignThemeBundles.Scripts.Global" WebAssemblyScriptFiles="GlobalScripts" @rendermode="InteractiveAuto" />
<script src="_framework/blazor.web.js"></script>
<div id="blazor-error-ui">
@if (Env.IsDevelopment())
{
<text>An unhandled exception has occurred. See browser dev tools for details.</text>
}
else if (Env.IsStaging() || Env.IsProduction())
{
<text>An error has occurred. This application may no longer respond until reloaded.</text>
}
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
</body>
</html>
@code{
private List<string> GlobalStyles =>
[
"global.css",
"main.css",
"blazor-global-styles.css"
];
private List<string> GlobalScripts =>
[
"global.js"
];
}

56
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/Program.cs

@ -0,0 +1,56 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
namespace BookStoreWebApp.Blazor;
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"))
.WriteTo.Async(c => c.Console())
.CreateLogger();
try
{
Log.Information("Starting web host.");
var builder = WebApplication.CreateBuilder(args);
builder.Host.AddAppSettingsSecretsJson()
.UseAutofac()
.UseSerilog();
await builder.AddApplicationAsync<BookStoreWebAppBlazorModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
return 0;
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
}

28
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/Properties/launchSettings.json

@ -0,0 +1,28 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:44390/",
"sslPort": 44390
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"BookStoreWebApp.Blazor": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
"applicationUrl": "https://localhost:44390/",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

20
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/_Imports.razor

@ -0,0 +1,20 @@
@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 static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.JSInterop
@using BookStoreWebApp.Blazor.Client
@* @using Blazorise *@
@* @using Blazorise.DataGrid *@
@* @using Volo.Abp.BlazoriseUI *@
@* @using Volo.Abp.BlazoriseUI.Components *@
@using AntDesign
@using Lsw.Abp.AntDesignUI
@using Lsw.Abp.AntDesignUI.Components
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Layout
@using Lsw.Abp.AspnetCore.Components.Web.AntDesignTheme.Bundling

11
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/abp.resourcemapping.js

@ -0,0 +1,11 @@
module.exports = {
aliases: {
},
clean: [
],
mappings: {
}
};

2
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/appsettings.Development.json

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

16
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/appsettings.json

@ -0,0 +1,16 @@
{
"App": {
"SelfUrl": "https://localhost:44390",
"RedirectAllowedUrls": "https://localhost:44390"
},
"ConnectionStrings": {
"Default": "mongodb://localhost:27017/BookStoreWebApp"
},
"AuthServer": {
"Authority": "https://localhost:44390",
"RequireHttpsMetadata": false
},
"StringEncryption": {
"DefaultPassPhrase": "ADLoA9exOjkj7Duu"
}
}

2
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/appsettings.secrets.json

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

9
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/package.json

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

18
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/web.config

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\BookStoreWebApp.Blazor.dll" stdoutLogEnabled="false" stdoutLogFile=".\Logs\stdout" hostingModel="inprocess" />
</system.webServer>
</location>
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="x-powered-by" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

22
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/blazor-global-styles.css

@ -0,0 +1,22 @@
#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}
:root .lpx-brand-logo {
--lpx-logo: url('/images/logo/leptonx/logo-light.png');
--lpx-logo-icon: url('/images/logo/leptonx/logo-light-thumbnail.png');
}

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

8
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/global-styles.css

@ -0,0 +1,8 @@
body {
}
:root .lpx-brand-logo {
--lpx-logo: url('/images/logo/leptonx/logo-light.png');
--lpx-logo-icon: url('/images/logo/leptonx/logo-light-thumbnail.png');
}

BIN
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/images/logo/leptonx/logo-dark-thumbnail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/images/logo/leptonx/logo-dark.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/images/logo/leptonx/logo-light-thumbnail.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/wwwroot/images/logo/leptonx/logo-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

340
samples/BookStoreWebApp/src/BookStoreWebApp.Blazor/yarn.lock

@ -0,0 +1,340 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@abp/aspnetcore.components.server.leptonxlitetheme@~3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.components.server.leptonxlitetheme/-/aspnetcore.components.server.leptonxlitetheme-3.2.0.tgz#a3c2ae51a6f15b8fca402be7eeb94c7c74296179"
integrity sha512-ZqB0FZD6CSO8yvBpfb4QO62wIEW+iIBGfJt0DEYwMFboDcHBfeL5SZ/JpPsEyLe46woFNym45s0Cy913pCCQ/g==
dependencies:
"@abp/aspnetcore.components.server.theming" "~8.2.0"
"@abp/aspnetcore.components.server.theming@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.components.server.theming/-/aspnetcore.components.server.theming-8.2.0.tgz#0506fbb64812b0fc27697a7ddd6a16cf291998f8"
integrity sha512-/JQkOePRvY9DEXtXaXfTNxmZwu9HWT0ixLLt94Jt7LgxGmyO7esIgLwXgqC7EI/LF7KVWXTM7dE0hxGqpNX/qw==
dependencies:
"@abp/bootstrap" "~8.2.0"
"@abp/font-awesome" "~8.2.0"
"@abp/aspnetcore.mvc.ui.theme.leptonxlite@~3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.leptonxlite/-/aspnetcore.mvc.ui.theme.leptonxlite-3.2.0.tgz#02b93be81bd71b7d0f451883841d02be8620134e"
integrity sha512-cHazis0typaNtMja5HfKf6+udZ3eHQO29RRjizB4VKSznmgsy0o/u6wlg6HSch4DP33N6yN7TOd6re77+xBM+Q==
dependencies:
"@abp/aspnetcore.mvc.ui.theme.shared" "~8.2.0"
"@abp/aspnetcore.mvc.ui.theme.shared@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui.theme.shared/-/aspnetcore.mvc.ui.theme.shared-8.2.0.tgz#dc16714f032c04a2219b41abcedef73076db89c8"
integrity sha512-6iCo5+aSfhmAtKgBOLFNG7uKnOWv64RH8LwVPbMDVdjG+gKD96V+OunFLiG1p8Ta7Y+pip7PHWBKAqE3iC3Fag==
dependencies:
"@abp/aspnetcore.mvc.ui" "~8.2.0"
"@abp/bootstrap" "~8.2.0"
"@abp/bootstrap-datepicker" "~8.2.0"
"@abp/bootstrap-daterangepicker" "~8.2.0"
"@abp/datatables.net-bs5" "~8.2.0"
"@abp/font-awesome" "~8.2.0"
"@abp/jquery-form" "~8.2.0"
"@abp/jquery-validation-unobtrusive" "~8.2.0"
"@abp/lodash" "~8.2.0"
"@abp/luxon" "~8.2.0"
"@abp/malihu-custom-scrollbar-plugin" "~8.2.0"
"@abp/moment" "~8.2.0"
"@abp/select2" "~8.2.0"
"@abp/sweetalert2" "~8.2.0"
"@abp/timeago" "~8.2.0"
"@abp/toastr" "~8.2.0"
"@abp/aspnetcore.mvc.ui@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/aspnetcore.mvc.ui/-/aspnetcore.mvc.ui-8.2.0.tgz#c63db25bdebe45d81c0dc3722400ae518787f409"
integrity sha512-5Mu7TBDzXHBWqKMns2OVf2C5g1/038wz1XjsiaHANJ3b1iwHX1gt90nV5THK5yXRXxBjOUZnBE1TOj/jKAKEWQ==
dependencies:
ansi-colors "^4.1.1"
"@abp/bootstrap-datepicker@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/bootstrap-datepicker/-/bootstrap-datepicker-8.2.0.tgz#b4b82364e6e937b1661348b204b766834eb6d96c"
integrity sha512-n4vVjeS2OOuFWrYHMJx1wQp7iyMgM/cofnQdAJy3S2U4cm72DeSCfOQN0LcxdyTlYAE+zGWexmzMAmDTJk/dGg==
dependencies:
bootstrap-datepicker "^1.9.0"
"@abp/bootstrap-daterangepicker@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/bootstrap-daterangepicker/-/bootstrap-daterangepicker-8.2.0.tgz#997416b0ea29906883b3455b24d087974cc91b1e"
integrity sha512-+2Hahy66bgFi4t+2il6zfTunilg2ARyr52AOSkqH440xKcdIMEdLeCRHgWadJj6zKnWCmN4LXfvKWgMmWwhPbg==
dependencies:
bootstrap-daterangepicker "^3.1.0"
"@abp/bootstrap@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/bootstrap/-/bootstrap-8.2.0.tgz#39ffb0807cdd9820251c637ee06f39cd4b84e737"
integrity sha512-+sNl5KzVi4f1+IAf/+jBwOzUEoqDKuvyOp9YZHOrTVyVj8inDXFCIUqGxTetVcTuD0loxVnHWgdUHetsFJvkJA==
dependencies:
"@abp/core" "~8.2.0"
bootstrap "^5.1.3"
"@abp/core@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/core/-/core-8.2.0.tgz#8c5dad48d5f115ffe1d4b7bfa473de3a14a29331"
integrity sha512-SzohDqNpby11B/teq9Su1zng19j2X8ifGVdIF5RYXPb/SZwO4+wqOpJL62ycVupKoB/wBk8X89NK7qrSE19rtg==
dependencies:
"@abp/utils" "~8.2.0"
"@abp/datatables.net-bs5@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/datatables.net-bs5/-/datatables.net-bs5-8.2.0.tgz#a18af46aa96658d2996b0754aa3eae0dbef7e713"
integrity sha512-45icvFVaEoPqVXmrTbtHrLFU7Cb/QH/gFChcTTSET9l2rQWG1hM2F5t2GPu7Hct15tUmQKCco6rUM32m0uekFQ==
dependencies:
"@abp/datatables.net" "~8.2.0"
datatables.net-bs5 "^1.11.4"
"@abp/datatables.net@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/datatables.net/-/datatables.net-8.2.0.tgz#23a81e953e3d2c8a7b45c0b0a5b471997f66dde0"
integrity sha512-Uc+NPRaZdTl7rnFdPp3VtX/Fd0igRH3byaqKXAzX639a+aaI5mA2Utm0kMZFXYVoh7Hp8bYGP0W5pzdGWzk2Mg==
dependencies:
"@abp/jquery" "~8.2.0"
datatables.net "^1.11.4"
"@abp/font-awesome@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/font-awesome/-/font-awesome-8.2.0.tgz#a94e4e01c2a5df251c62ad602d8b7eb9b4ebc952"
integrity sha512-uTPdfLZWV1lJGia2FTaBCC84w1NpBiVEHWF8cpn2EURBXRcBJAn4PZOBOQVs+qgW4QyawfjuaR57hKmOyRodWw==
dependencies:
"@abp/core" "~8.2.0"
"@fortawesome/fontawesome-free" "^6.5.1"
"@abp/jquery-form@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/jquery-form/-/jquery-form-8.2.0.tgz#40397c9f6d2b73d52551bc0555da1d118cfc17c3"
integrity sha512-8pvNMTADbPzxsLGRFzePmMLa7ZZ1UWnvcVpP4aZMQ0lB356trbB5tH1Q/Kd7QeuqZS2LaejgVOG6NkZtk09sHQ==
dependencies:
"@abp/jquery" "~8.2.0"
jquery-form "^4.3.0"
"@abp/jquery-validation-unobtrusive@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-8.2.0.tgz#03eae705ca16eafb110d9c953c9813100afc5a67"
integrity sha512-JuuYQWnRghlm+i1gsMXpJafGDu3nUdKab3zZ3BTAR0TRnbHaqKzPudhW28nxPqyrLhlEFiWOxsIFAv2Zo3AYgQ==
dependencies:
"@abp/jquery-validation" "~8.2.0"
jquery-validation-unobtrusive "^3.2.12"
"@abp/jquery-validation@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/jquery-validation/-/jquery-validation-8.2.0.tgz#f351ffdb7494a4bd3fc46a5d53fb21c80a526da1"
integrity sha512-7NlsSARX1omJcTyDXsdK4RHy2Lr5bmIa/LiGniLbNSfsRQxupXVzt9pygRuq3j/4mPCbwf7qVUSld1rgznhyeg==
dependencies:
"@abp/jquery" "~8.2.0"
jquery-validation "^1.19.3"
"@abp/jquery@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/jquery/-/jquery-8.2.0.tgz#f76f604ceef48220857a2828ae5da33ac8efb063"
integrity sha512-ow/A7a8b5FVRolMlOKPVaJsizmm8VjOr+g3LG3/Sj6Zvebx+j4YLXlUEfCl8FmEj2jjh5Q3hsKQwp1HW/S+FXA==
dependencies:
"@abp/core" "~8.2.0"
jquery "~3.6.0"
"@abp/lodash@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/lodash/-/lodash-8.2.0.tgz#8f3c463023344a5f85d0bcf91a6b9d33d40d8a82"
integrity sha512-YqCT3idDmeMTUr0RjTtobpTXazkm3kSMdzmFsQvp31sC5eyXDb7/SQip0OP4c3/co2CYhH/vwX5mbAmzDazY3w==
dependencies:
"@abp/core" "~8.2.0"
lodash "^4.17.21"
"@abp/luxon@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/luxon/-/luxon-8.2.0.tgz#c8014556e51bcdc1b0484f799f85ead82221fbd2"
integrity sha512-n11g3IcqE3bpzL06hpYSceQksNz8fowRceu8lJvw2Vo6STNPlL0Kv5awf8qxUcX27XOkE8t8UTBzAERLXZzyCQ==
dependencies:
"@abp/core" "~8.2.0"
luxon "^2.3.0"
"@abp/malihu-custom-scrollbar-plugin@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-8.2.0.tgz#3fc39da63b0e57b4fe4f8fcf0f5c32751b9149b8"
integrity sha512-ALnvSVnzW1q2BVjkGOlgU/fp4VJME7PZWOD/DozAuh1aBKKR9ElR5T54Uf9HQrB53sRaPchHBl9usIOZ0WDqWQ==
dependencies:
"@abp/core" "~8.2.0"
malihu-custom-scrollbar-plugin "^3.1.5"
"@abp/moment@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/moment/-/moment-8.2.0.tgz#88aaf862be9d3129c5252dd021f584d19ecc6a0e"
integrity sha512-pg5LKOXCOe9ncoYCSWzvmPBH2VSVi+6CtmWnfcI23ir07PmAk5zmfNvDdkkBFsALxi5Ypq1UWH45o+a6FteHpQ==
dependencies:
moment "^2.9.0"
"@abp/select2@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/select2/-/select2-8.2.0.tgz#629777458160443b7d976a9642bfcab86d3b1ad4"
integrity sha512-TQJLRrfEJsDnp7n0OHKMyNF0Um+O4b7AvRhiVz8opiuAIpaFXQRp02/UuMBX9h7SQUWNONXEqKmLvKdyEIhLAA==
dependencies:
"@abp/core" "~8.2.0"
select2 "^4.0.13"
"@abp/sweetalert2@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/sweetalert2/-/sweetalert2-8.2.0.tgz#ff197a523e5b6c40da10e82e4834210e2aad396b"
integrity sha512-3w/bsEdV5B1Y288wVJa3CrkYASDqwwpuzjCk9g8Foe0xlc7TNs/X9HAm/PeDpdt8glxnxnvnN/zKJOtnFNRgWg==
dependencies:
"@abp/core" "~8.2.0"
sweetalert2 "^11.3.6"
"@abp/timeago@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/timeago/-/timeago-8.2.0.tgz#9c9806361e44271d9ada0680ee37bb85a00b44e2"
integrity sha512-Vwo7Y6m/9CGBcjqLQ/S6lyP27Ilf8ThB7B5QYYlKA5yAL/VqrRaElYmJ8g9+MH7elMuGPvfCnjlPYcBfP2anuQ==
dependencies:
"@abp/jquery" "~8.2.0"
timeago "^1.6.7"
"@abp/toastr@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/toastr/-/toastr-8.2.0.tgz#0b3781ccece1a10696461893543ae244f87b26c3"
integrity sha512-v0nKkP1PLIH92aTHOg/D6TgH65omMgQ30Ujamx2DU4yiRX5Z/2ZJNyO5//9mvmCt8hGXrqVJZwRLVKI/t7UV8A==
dependencies:
"@abp/jquery" "~8.2.0"
toastr "^2.1.4"
"@abp/utils@~8.2.0":
version "8.2.0"
resolved "https://registry.yarnpkg.com/@abp/utils/-/utils-8.2.0.tgz#7895fa98e0729cb6d2f65ac1660ddfc94bd979cd"
integrity sha512-47WX1bNId6KEm9Se4BJmd3dQXDscYB878RTABXnOmB018QSNQjJFwp8dR0E9I5ZaXRUcBetrpkHku6OyXr/gXw==
dependencies:
just-compare "^2.3.0"
"@fortawesome/fontawesome-free@^6.5.1":
version "6.6.0"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-6.6.0.tgz#0e984f0f2344ee513c185d87d77defac4c0c8224"
integrity sha512-60G28ke/sXdtS9KZCpZSHHkCbdsOGEhIUGlwq6yhY74UpTiToIh8np7A8yphhM4BWsvNFtIvLpi4co+h9Mr9Ow==
ansi-colors@^4.1.1:
version "4.1.3"
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b"
integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==
bootstrap-datepicker@^1.9.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/bootstrap-datepicker/-/bootstrap-datepicker-1.10.0.tgz#61612bbe8bf0a69a5bce32bbcdda93ebb6ccf24a"
integrity sha512-lWxtSYddAQOpbAO8UhYhHLcK6425eWoSjb5JDvZU3ePHEPF6A3eUr51WKaFy4PccU19JRxUG6wEU3KdhtKfvpg==
dependencies:
jquery ">=3.4.0 <4.0.0"
bootstrap-daterangepicker@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/bootstrap-daterangepicker/-/bootstrap-daterangepicker-3.1.0.tgz#632e6fb2de4b6360c5c0a9d5f6adb9aace051fe8"
integrity sha512-oaQZx6ZBDo/dZNyXGVi2rx5GmFXThyQLAxdtIqjtLlYVaQUfQALl5JZMJJZzyDIX7blfy4ppZPAJ10g8Ma4d/g==
dependencies:
jquery ">=1.10"
moment "^2.9.0"
bootstrap@^5.1.3:
version "5.3.3"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.3.tgz#de35e1a765c897ac940021900fcbb831602bac38"
integrity sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==
datatables.net-bs5@^1.11.4:
version "1.13.11"
resolved "https://registry.yarnpkg.com/datatables.net-bs5/-/datatables.net-bs5-1.13.11.tgz#c7c23aaf37e9fdd1274e172845ad29c9c9d78bb8"
integrity sha512-NQO15TjXo4xvZ0jReC4Uf86ezbQzPQPdaN2YncrCPhzQ6fx+2WD7DUq4ur0HbAcYHo94/M+MtD5Ch29To7Rj3Q==
dependencies:
datatables.net "1.13.11"
jquery "1.8 - 4"
datatables.net@1.13.11, datatables.net@^1.11.4:
version "1.13.11"
resolved "https://registry.yarnpkg.com/datatables.net/-/datatables.net-1.13.11.tgz#e2a4c8b50553512f241ebfcbc078d74d551183b2"
integrity sha512-AE6RkMXziRaqzPcu/pl3SJXeRa6fmXQG/fVjuRESujvkzqDCYEeKTTpPMuVJSGYJpPi32WGSphVNNY1G4nSN/g==
dependencies:
jquery "1.8 - 4"
jquery-form@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/jquery-form/-/jquery-form-4.3.0.tgz#7d3961c314a1f2d15298f4af1d3943f54f4149c6"
integrity sha512-q3uaVCEWdLOYUCI6dpNdwf/7cJFOsUgdpq6r0taxtGQ5NJSkOzofyWm4jpOuJ5YxdmL1FI5QR+q+HB63HHLGnQ==
dependencies:
jquery ">=1.7.2"
jquery-mousewheel@>=3.0.6:
version "3.1.13"
resolved "https://registry.yarnpkg.com/jquery-mousewheel/-/jquery-mousewheel-3.1.13.tgz#06f0335f16e353a695e7206bf50503cb523a6ee5"
integrity sha512-GXhSjfOPyDemM005YCEHvzrEALhKDIswtxSHSR2e4K/suHVJKJxxRCGz3skPjNxjJjQa9AVSGGlYjv1M3VLIPg==
jquery-validation-unobtrusive@^3.2.12:
version "3.2.12"
resolved "https://registry.yarnpkg.com/jquery-validation-unobtrusive/-/jquery-validation-unobtrusive-3.2.12.tgz#1d52841f653e516525c251e494b042e664dad8af"
integrity sha512-kPixGhVcuat7vZXngGFfSIksy4VlzZcHyRgnBIZdsfVneCU+D5sITC8T8dD/9c9K/Q+qkMlgp7ufJHz93nKSuQ==
dependencies:
jquery "^3.5.1"
jquery-validation ">=1.16"
jquery-validation@>=1.16, jquery-validation@^1.19.3:
version "1.21.0"
resolved "https://registry.yarnpkg.com/jquery-validation/-/jquery-validation-1.21.0.tgz#78fc05ab76020912a246af3661b3f54a438bca93"
integrity sha512-xNot0rlUIgu7duMcQ5qb6MGkGL/Z1PQaRJQoZAURW9+a/2PGOUxY36o/WyNeP2T9R6jvWB8Z9lUVvvQWI/Zs5w==
"jquery@1.8 - 4", jquery@>=1.10, jquery@>=1.12.0, "jquery@>=1.5.0 <4.0", jquery@>=1.7.2, "jquery@>=3.4.0 <4.0.0", jquery@^3.5.1:
version "3.7.1"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de"
integrity sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==
jquery@~3.6.0:
version "3.6.4"
resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.6.4.tgz#ba065c188142100be4833699852bf7c24dc0252f"
integrity sha512-v28EW9DWDFpzcD9O5iyJXg3R3+q+mET5JhnjJzQUZMHOv67bpSIHq81GEYpPNZHG+XXHsfSme3nxp/hndKEcsQ==
just-compare@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/just-compare/-/just-compare-2.3.0.tgz#a2adcc1d1940536263275f5a1ef1298bcacfeda7"
integrity sha512-6shoR7HDT+fzfL3gBahx1jZG3hWLrhPAf+l7nCwahDdT9XDtosB9kIF0ZrzUp5QY8dJWfQVr5rnsPqsbvflDzg==
lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
luxon@^2.3.0:
version "2.5.2"
resolved "https://registry.yarnpkg.com/luxon/-/luxon-2.5.2.tgz#17ed497f0277e72d58a4756d6a9abee4681457b6"
integrity sha512-Yg7/RDp4nedqmLgyH0LwgGRvMEKVzKbUdkBYyCosbHgJ+kaOUx0qzSiSatVc3DFygnirTPYnMM2P5dg2uH1WvA==
malihu-custom-scrollbar-plugin@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/malihu-custom-scrollbar-plugin/-/malihu-custom-scrollbar-plugin-3.1.5.tgz#310cecc5e59415a1c29e9dfb5d2b6e01d66a29ef"
integrity sha512-lwW3LgI+CNDMPnP4ED2la6oYxWMkCXlnhex+s2wuOLhFDFGnGmQuTQVdRK9bvDLpxs10sGlfErVufJy9ztfgJQ==
dependencies:
jquery-mousewheel ">=3.0.6"
moment@^2.9.0:
version "2.30.1"
resolved "https://registry.yarnpkg.com/moment/-/moment-2.30.1.tgz#f8c91c07b7a786e30c59926df530b4eac96974ae"
integrity sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==
select2@^4.0.13:
version "4.0.13"
resolved "https://registry.yarnpkg.com/select2/-/select2-4.0.13.tgz#0dbe377df3f96167c4c1626033e924372d8ef44d"
integrity sha512-1JeB87s6oN/TDxQQYCvS5EFoQyvV6eYMZZ0AeA4tdFDYWN3BAGZ8npr17UBFddU0lgAt3H0yjX3X6/ekOj1yjw==
sweetalert2@^11.3.6:
version "11.12.3"
resolved "https://registry.yarnpkg.com/sweetalert2/-/sweetalert2-11.12.3.tgz#ce272d8c8d0754090a77465b89769d45430e6199"
integrity sha512-tgGJSgfSV/xK113JEvhjwqKAuBYLXsZf0z+tGlHKQNnsLMi4eSNuzn9tt5hUdvjOVTLSPDgo0Lc+tnjy9Uj7Og==
timeago@^1.6.7:
version "1.6.7"
resolved "https://registry.yarnpkg.com/timeago/-/timeago-1.6.7.tgz#afd467c29a911e697fc22a81888c7c3022783cb5"
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.yarnpkg.com/toastr/-/toastr-2.1.4.tgz#8b43be64fb9d0c414871446f2db8e8ca4e95f181"
integrity sha512-LIy77F5n+sz4tefMmFOntcJ6HL0Fv3k1TDnNmFZ0bU/GcvIIfy6eG2v7zQmMiYgaalAiUv75ttFrPn5s0gyqlA==
dependencies:
jquery ">=1.12.0"

45
samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/BookStoreWebApp.DbMigrator.csproj

@ -0,0 +1,45 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
</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="Serilog.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="8.2.0" />
<ProjectReference Include="..\BookStoreWebApp.Application.Contracts\BookStoreWebApp.Application.Contracts.csproj" />
<ProjectReference Include="..\BookStoreWebApp.MongoDB\BookStoreWebApp.MongoDB.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
</Project>

14
samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/BookStoreWebAppDbMigratorModule.cs

@ -0,0 +1,14 @@
using BookStoreWebApp.MongoDB;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace BookStoreWebApp.DbMigrator;
[DependsOn(
typeof(AbpAutofacModule),
typeof(BookStoreWebAppMongoDbModule),
typeof(BookStoreWebAppApplicationContractsModule)
)]
public class BookStoreWebAppDbMigratorModule : AbpModule
{
}

51
samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/DbMigratorHostedService.cs

@ -0,0 +1,51 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using BookStoreWebApp.Data;
using Serilog;
using Volo.Abp;
using Volo.Abp.Data;
namespace BookStoreWebApp.DbMigrator;
public class DbMigratorHostedService : IHostedService
{
private readonly IHostApplicationLifetime _hostApplicationLifetime;
private readonly IConfiguration _configuration;
public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, IConfiguration configuration)
{
_hostApplicationLifetime = hostApplicationLifetime;
_configuration = configuration;
}
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = await AbpApplicationFactory.CreateAsync<BookStoreWebAppDbMigratorModule>(options =>
{
options.Services.ReplaceConfiguration(_configuration);
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
options.AddDataMigrationEnvironment();
}))
{
await application.InitializeAsync();
await application
.ServiceProvider
.GetRequiredService<BookStoreWebAppDbMigrationService>()
.MigrateAsync();
await application.ShutdownAsync();
_hostApplicationLifetime.StopApplication();
}
}
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}

41
samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/Program.cs

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

13
samples/BookStoreWebApp/src/BookStoreWebApp.DbMigrator/appsettings.json

@ -0,0 +1,13 @@
{
"ConnectionStrings": {
"Default": "mongodb://localhost:27017/BookStoreWebApp"
},
"OpenIddict": {
"Applications": {
"BookStoreWebApp_Swagger": {
"ClientId": "BookStoreWebApp_Swagger",
"RootUrl": "https://localhost:44352"
}
}
}
}

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

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

32
samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/BookStoreWebApp.Domain.Shared.csproj

@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>BookStoreWebApp</RootNamespace>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="8.2.0" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="8.2.0" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="8.2.0" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="8.2.0" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="8.2.0" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="8.2.0" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="8.2.0" />
<PackageReference Include="Volo.Abp.OpenIddict.Domain.Shared" Version="8.2.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\BookStoreWebApp\*.json" />
<Content Remove="Localization\BookStoreWebApp\*.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.4" />
</ItemGroup>
</Project>

6
samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/BookStoreWebAppDomainErrorCodes.cs

@ -0,0 +1,6 @@
namespace BookStoreWebApp;
public static class BookStoreWebAppDomainErrorCodes
{
/* You can add your business exception error codes here, as constants */
}

58
samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/BookStoreWebAppDomainSharedModule.cs

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

22
samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/BookStoreWebAppGlobalFeatureConfigurator.cs

@ -0,0 +1,22 @@
using Volo.Abp.Threading;
namespace BookStoreWebApp;
public static class BookStoreWebAppGlobalFeatureConfigurator
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
/* You can configure (enable/disable) global features of the used modules here.
*
* YOU CAN SAFELY DELETE THIS CLASS AND REMOVE ITS USAGES IF YOU DON'T NEED TO IT!
*
* Please refer to the documentation to lear more about the Global Features System:
* https://docs.abp.io/en/abp/latest/Global-Features
*/
});
}
}

73
samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/BookStoreWebAppModuleExtensionConfigurator.cs

@ -0,0 +1,73 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace BookStoreWebApp;
public static class BookStoreWebAppModuleExtensionConfigurator
{
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
AbpUserConsts.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});
property.Configuration[IdentityModuleExtensionConsts.ConfigurationNames.AllowUserToEdit] = true;
//...other configurations for this property
}
);
});
});
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
*/
}
}

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

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

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

@ -0,0 +1,8 @@
{
"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/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/de.json

@ -0,0 +1,8 @@
{
"culture": "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."
}
}

8
samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/en-GB.json

@ -0,0 +1,8 @@
{
"culture": "en-GB",
"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."
}
}

8
samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/en.json

@ -0,0 +1,8 @@
{
"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."
}
}

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

@ -0,0 +1,8 @@
{
"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/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/fi.json

@ -0,0 +1,8 @@
{
"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/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/fr.json

@ -0,0 +1,8 @@
{
"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/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/hi.json

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

8
samples/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/hr.json

@ -0,0 +1,8 @@
{
"culture": "hr",
"texts": {
"Menu:Home": "Početna",
"Welcome": "Dobrodošli",
"LongWelcomeMessage": "Dobrodošli u aplikaciju. Ovo je startup projekt temeljen na ABP framework-u. Za više informacija posjetite abp.io."
}
}

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

@ -0,0 +1,8 @@
{
"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/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/is.json

@ -0,0 +1,8 @@
{
"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/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/it.json

@ -0,0 +1,8 @@
{
"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/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/nl.json

@ -0,0 +1,8 @@
{
"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/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/pl-PL.json

@ -0,0 +1,8 @@
{
"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/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/pt-BR.json

@ -0,0 +1,8 @@
{
"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/BookStoreWebApp/src/BookStoreWebApp.Domain.Shared/Localization/BookStoreWebApp/ro-RO.json

@ -0,0 +1,8 @@
{
"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."
}
}

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

Loading…
Cancel
Save