diff --git a/Directory.Packages.props b/Directory.Packages.props
index eeee7a7ff3..9c944083b9 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -18,10 +18,10 @@
-
-
-
-
+
+
+
+
diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json
index 9c414e2f52..2fc0859b58 100644
--- a/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json
+++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Admin/Localization/Resources/en.json
@@ -683,6 +683,9 @@
"DiscountRate": "Discount Rate",
"Menu:RedisManagement": "Redis Management",
"RedisManagement": "Redis Management",
- "Permission:RedisManagement": "Redis Management"
+ "Permission:RedisManagement": "Redis Management",
+ "UserCleanUp": "User Clean Up",
+ "Permission:UserCleanUp": "User Clean Up",
+ "AllowPrivateQuestion": "Allow Private Question"
}
}
diff --git a/docs/en/Community-Articles/2024-12-01-OpenAI-Integration/POST.md b/docs/en/Community-Articles/2024-12-01-OpenAI-Integration/POST.md
index c07509d2e3..4706e79f49 100644
--- a/docs/en/Community-Articles/2024-12-01-OpenAI-Integration/POST.md
+++ b/docs/en/Community-Articles/2024-12-01-OpenAI-Integration/POST.md
@@ -62,6 +62,8 @@ dotnet add package Microsoft.Extensions.AI.OpenAI --prerelease
> Replace the value of the `Key` with your OpenAI API key.
+> **Important Security Note**: Storing sensitive information like API keys in `appsettings.json` is not recommended due to security concerns. Please refer to the [official Microsoft documentation](https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets) for secure secret management best practices.
+
Next, add the following code to the `ConfigureServices` method in `OpenAIIntegrationBlazorModule`:
```csharp
diff --git a/docs/en/Community-Articles/2025-01-24-Understanding-Transactions-in-ABP-Unit-Of-Work/POST.md b/docs/en/Community-Articles/2025-01-24-Understanding-Transactions-in-ABP-Unit-Of-Work/POST.md
new file mode 100644
index 0000000000..49a75b2a25
--- /dev/null
+++ b/docs/en/Community-Articles/2025-01-24-Understanding-Transactions-in-ABP-Unit-Of-Work/POST.md
@@ -0,0 +1,327 @@
+# Understanding Transactions in ABP Unit of Work
+
+[The Unit of Work](https://en.wikipedia.org/wiki/Unit_of_work) is a software design pattern that maintains a list of objects affected by a business transaction and coordinates the writing out of changes and the resolution of concurrency problems to ensure that all changes are made within a single transaction.
+
+
+
+## Transaction Management Overview
+
+One of the primary responsibilities of the Unit of Work is managing database transactions. It provides the following transaction management features:
+
+- Automatically manages database connections and transaction scopes, eliminating the need for manual transaction control
+- Ensures business operation integrity by making all database operations within a unit of work either succeed or roll back completely
+- Supports configuration of transaction isolation levels and timeout periods
+- Supports nested transactions and transaction propagation
+
+## Transaction Behavior
+
+### Default Transaction Settings
+
+You can modify the default behavior through the following configuration:
+
+```csharp
+Configure(options =>
+{
+ /*
+ Modify the default transaction behavior for all unit of work:
+ - UnitOfWorkTransactionBehavior.Enabled: Always enable transactions, all requests will start a transaction
+ - UnitOfWorkTransactionBehavior.Disabled: Always disable transactions, no requests will start a transaction
+ - UnitOfWorkTransactionBehavior.Auto: Automatically decide whether to start a transaction based on HTTP request type
+ */
+ options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
+
+ // Set default timeout
+ options.Timeout = TimeSpan.FromSeconds(30);
+
+ // Set default isolation level
+ options.IsolationLevel = IsolationLevel.ReadCommitted;
+});
+```
+
+### Automatic Transaction Management
+
+ABP Framework implements automatic management of Unit of Work and transactions through middlewares, MVC global filters, and interceptors. In most cases, you don't need to manage them manually
+
+### Transaction Behavior for HTTP Requests
+
+By default, the framework adopts an intelligent transaction management strategy for HTTP requests:
+- `GET` requests won't start a transactional unit of work because there is no data modification
+- Other HTTP requests (`POST/PUT/DELETE` etc.) will start a transactional unit of work
+
+### Manual Transaction Control
+
+If you need to manually start a new unit of work, you can customize whether to start a transaction and set the transaction isolation level and timeout:
+
+```csharp
+// Start a transactional unit of work
+using (var uow = _unitOfWorkManager.Begin(
+ isTransactional: true,
+ isolationLevel: IsolationLevel.RepeatableRead,
+ timeout: 30
+))
+{
+ // Execute database operations within transaction
+ await uow.CompleteAsync();
+}
+```
+
+```csharp
+// Start a non-transactional unit of work
+using (var uow = _unitOfWorkManager.Begin(
+ isTransactional: false
+))
+{
+ // Execute database operations without transaction
+ await uow.CompleteAsync();
+}
+```
+
+### Configuring Transactions Using `[UnitOfWork]` Attribute
+
+You can customize transaction behavior by using the `UnitOfWorkAttribute` on methods, classes, or interfaces:
+
+```csharp
+[UnitOfWork(
+ IsTransactional = true,
+ IsolationLevel = IsolationLevel.RepeatableRead,
+ Timeout = 30
+)]
+public virtual async Task ProcessOrderAsync(int orderId)
+{
+ // Execute database operations within transaction
+}
+```
+
+### Non-Transactional Unit of Work
+
+In some scenarios, you might not need transaction support. You can create a non-transactional unit of work by setting `IsTransactional = false`:
+
+```csharp
+public virtual async Task ImportDataAsync(List items)
+{
+ using (var uow = _unitOfWorkManager.Begin(
+ isTransactional: false
+ ))
+ {
+ foreach (var item in items)
+ {
+ await _repository.InsertAsync(item, autoSave: true);
+ // Each InsertAsync will save to database immediately
+ // If subsequent operations fail, saved data won't be rolled back
+ }
+
+ await uow.CompleteAsync();
+ }
+}
+```
+
+Applicable scenarios:
+- Batch import data scenarios where partial success is accepted
+- Read-only operations, such as queries
+- Scenarios with low data consistency requirements
+
+### Methods to Commit Transactions
+
+#### In Transactional Unit of Work
+
+A Unit of Work provides several methods to commit changes to the database:
+
+1. **IUnitOfWork.SaveChangesAsync**
+
+```csharp
+await _unitOfWorkManager.Current.SaveChangesAsync();
+```
+
+2. **autoSave parameter in repositories**
+
+```csharp
+await _repository.InsertAsync(entity, autoSave: true);
+```
+
+Both `autoSave` and `SaveChangesAsync` commit changes in the current context to the database. However, these are not applied until `CompleteAsync` is called. If the unit of work throws an exception or `CompleteAsync` is not called, the transaction will be rolled back. It means all the DB operations will be reverted back. Only after successfully executing `CompleteAsync` will the transaction be permanently committed to the database.
+
+3. **CompleteAsync**
+
+```csharp
+using (var uow = _unitOfWorkManager.Begin())
+{
+ // Execute database operations
+ await uow.CompleteAsync();
+}
+```
+
+When you manually control the Unit of Work with `UnitOfWorkManager`, the `CompleteAsync` method is crucial for transaction completion. The unit of work maintains a `DbTransaction` object internally, and the `CompleteAsync` method invokes `DbTransaction.CommitAsync` to commit the transaction. The transaction will not be committed if `CompleteAsync` is either not executed or fails to execute successfully.
+
+This method not only commits all database transactions but also:
+
+- Executes and processes all pending domain events within the Unit of Work
+- Executes all registered post-operations and cleanup tasks within the Unit of Work
+- Releases all DbTransaction resources upon disposal of the Unit of Work object
+
+> Note: `CompleteAsync` method should be called only once. Multiple calls are not supported.
+
+#### In Non-Transactional Unit of Work
+
+In non-transactional Unit of Work, these methods behave differently:
+
+Both `autoSave` and `SaveChangesAsync` will persist changes to the database immediately, and these changes cannot be rolled back. Even in non-transactional Unit of Work, calling the `CompleteAsync` method remains necessary as it handles other essential tasks.
+
+Example:
+```csharp
+using (var uow = _unitOfWorkManager.Begin(isTransactional: false))
+{
+ // Changes are persisted immediately and cannot be rolled back
+ await _repository.InsertAsync(entity1, autoSave: true);
+
+ // This operation persists independently of the previous operation
+ await _repository.InsertAsync(entity2, autoSave: true);
+
+ await uow.CompleteAsync();
+}
+```
+
+### Methods to Roll Back Transactions
+
+#### In Transactional Unit of Work
+
+A unit of work provides multiple approaches to roll back transactions:
+
+1. **Automatic Rollback**
+
+For transactions automatically managed by the ABP Framework, any uncaught exceptions during the request will trigger an automatic rollback.
+
+2. **Manual Rollback**
+
+For manually managed transactions, you can explicitly invoke the `RollbackAsync` method to immediately roll back the current transaction.
+
+> Important: Once `RollbackAsync` is called, the entire Unit of Work transaction will be rolled back immediately, and any subsequent calls to `CompleteAsync` will have no effect.
+
+```csharp
+using (var uow = _unitOfWorkManager.Begin(
+ isTransactional: true,
+ isolationLevel: IsolationLevel.RepeatableRead,
+ timeout: 30
+))
+{
+ await _repository.InsertAsync(entity);
+
+ if (someCondition)
+ {
+ await uow.RollbackAsync();
+ return;
+ }
+
+ await uow.CompleteAsync();
+}
+```
+
+The `CompleteAsync` method attempts to commit the transaction. If any exceptions occur during this process, the transaction will not be committed.
+
+Here are two common exception scenarios:
+
+1. **Exception Handling Within Unit of Work**
+
+```csharp
+using (var uow = _unitOfWorkManager.Begin(
+ isTransactional: true,
+ isolationLevel: IsolationLevel.RepeatableRead,
+ timeout: 30
+))
+{
+ try
+ {
+ await _bookRepository.InsertAsync(book);
+ await uow.SaveChangesAsync();
+ await _productRepository.UpdateAsync(product);
+ await uow.CompleteAsync();
+ }
+ catch (Exception)
+ {
+ // Exceptions can occur in InsertAsync, SaveChangesAsync, UpdateAsync, or CompleteAsync
+ // Even if some operations succeed, the transaction remains uncommitted to the database
+ // While you can explicitly call RollbackAsync to roll back the transaction,
+ // the transaction will not be committed anyway if CompleteAsync fails to execute
+ throw;
+ }
+}
+```
+
+2. **Exception Handling Outside Unit of Work**
+
+```csharp
+try
+{
+ using (var uow = _unitOfWorkManager.Begin(
+ isTransactional: true,
+ isolationLevel: IsolationLevel.RepeatableRead,
+ timeout: 30
+ ))
+ {
+ await _bookRepository.InsertAsync(book);
+ await uow.SaveChangesAsync();
+ await _productRepository.UpdateAsync(product);
+ await uow.CompleteAsync();
+ }
+}
+catch (Exception)
+{
+ // Exceptions can occur in UpdateAsync, SaveChangesAsync, UpdateAsync, or CompleteAsync
+ // Even if some operations succeed, the transaction remains uncommitted to the database
+ // Since CompleteAsync was not successfully executed, the transaction will not be committed
+ throw;
+}
+```
+
+#### In Non-Transactional Unit of Work
+
+In non-transactional units of work, operations are irreversible. Changes saved using `autoSave: true` or `SaveChangesAsync()` are persisted immediately, and the `RollbackAsync` method has no effect.
+
+## Transaction Management Best Practices
+
+### 1. Remember to Commit Transactions
+
+When manually controlling transactions, remember to call the `CompleteAsync` method to commit the transaction after operations are complete.
+
+### 2. Pay Attention to Context
+
+If a unit of work already exists in the current context, `UnitOfWorkManager.Begin` method and` UnitOfWorkAttribute` will **reuse it**. Specify `requiresNew: true` to force create a new unit of work.
+
+```csharp
+[UnitOfWork]
+public async Task Method1()
+{
+ using (var uow = _unitOfWorkManager.Begin(
+ requiresNew: true,
+ isTransactional: true,
+ isolationLevel: IsolationLevel.RepeatableRead,
+ timeout: 30
+ ))
+ {
+ await Method2();
+ await uow.CompleteAsync();
+ }
+}
+```
+
+### 3. Use `virtual` Methods
+
+To be able to use Unit of Work attribute, you must use the `virtual` modifier for methods in dependency injection class services, because ABP Framework uses interceptors, and it cannot intercept non `virtual` methods, thus unable to implement Unit of Work functionality.
+
+### 4. Avoid Long Transactions
+
+Enabling long-running transactions can lead to resource locking, excessive transaction log usage, and reduced concurrent performance, while rollback costs are high and may exhaust database connection resources. It's recommended to split into shorter transactions, reduce lock holding time, and optimize performance and reliability.
+
+## Transaction-Related Recommendations
+
+- Choose appropriate transaction isolation levels based on business requirements
+- Avoid overly long transactions, long-running operations should be split into multiple small transactions
+- Use the `requiresNew` parameter reasonably to control transaction boundaries
+- Pay attention to setting appropriate transaction timeout periods
+- Ensure transactions can properly roll back when exceptions occur
+- For read-only operations, it's recommended to use non-transactional Unit of Work to improve performance
+
+## References
+
+- [ABP Unit of Work](https://abp.io/docs/latest/framework/architecture/domain-driven-design/unit-of-work)
+- [EF Core Transactions](https://docs.microsoft.com/en-us/ef/core/saving/transactions)
+- [Transaction Isolation Levels](https://docs.microsoft.com/en-us/dotnet/api/system.data.isolationlevel)
diff --git a/docs/en/Community-Articles/2025-01-24-Understanding-Transactions-in-ABP-Unit-Of-Work/pic.png b/docs/en/Community-Articles/2025-01-24-Understanding-Transactions-in-ABP-Unit-Of-Work/pic.png
new file mode 100644
index 0000000000..d6805a806e
Binary files /dev/null and b/docs/en/Community-Articles/2025-01-24-Understanding-Transactions-in-ABP-Unit-Of-Work/pic.png differ
diff --git a/docs/en/cli/index.md b/docs/en/cli/index.md
index 645c12a715..e9b4e5c42a 100644
--- a/docs/en/cli/index.md
+++ b/docs/en/cli/index.md
@@ -883,18 +883,13 @@ abp translate -c zh-Hans --online --deepl-auth-key
### login
-Some features of the CLI requires to be logged in to ABP Platform. To login with your username write:
+Some features of the CLI requires to be logged in to ABP Platform. The login command supports the following usage options:
```bash
-abp login # Allows you to enter your password hidden
-abp login -p # Specify the password as a parameter (password is visible)
-abp login --organization # If you have multiple organizations, you need set your active organization
-abp login -p -o # You can enter both your password and organization in the same command
-abp login --device # Use device login flow
+abp login # Opens a default browser to log in to ABP Platform via abp.io
+abp login --device # Use device login flow
```
-> When using the -p parameter, be careful as your password will be visible. It's useful for CI/CD automation pipelines.
-
A new login with an already active session overwrites the previous session.
### login-info
diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json
index 8253b732df..8ca147a3db 100644
--- a/docs/en/docs-nav.json
+++ b/docs/en/docs-nav.json
@@ -1430,6 +1430,10 @@
"text": "LeptonX Lite",
"path": "ui-themes/lepton-x-lite/blazor.md"
},
+ {
+ "text": "LeptonX",
+ "path": "ui-themes/lepton-x/blazor.md"
+ },
{
"text": "Branding",
"path": "framework/ui/blazor/branding.md"
@@ -1751,6 +1755,10 @@
{
"text": "LeptonX Lite",
"path": "ui-themes/lepton-x-lite/angular.md"
+ },
+ {
+ "text": "LeptonX",
+ "path": "ui-themes/lepton-x/angular.md"
}
]
},
diff --git a/docs/en/framework/ui/blazor/overall.md b/docs/en/framework/ui/blazor/overall.md
index 12cef14552..54a545759e 100644
--- a/docs/en/framework/ui/blazor/overall.md
+++ b/docs/en/framework/ui/blazor/overall.md
@@ -1,14 +1,17 @@
# Blazor UI: Overall
-## Introduction
+[Blazor](https://docs.microsoft.com/en-us/aspnet/core/blazor/) is a framework for building interactive client-side web UI with .NET. It enables .NET developers to create Single-Page Web Applications using C# and the Razor syntax.
-[Blazor](https://docs.microsoft.com/en-us/aspnet/core/blazor/) is a framework for building interactive client-side web UI with .NET. It is promising for a .NET developer that you can create Single-Page Web Applications using C# and the Razor syntax.
+ABP provides comprehensive infrastructure and integrations that make your Blazor development easier, comfortable and enjoyable. ABP supports multiple Blazor hosting models:
-ABP provides infrastructure and integrations that make your Blazor development even easier, comfortable and enjoyable.
+* **Blazor WebAssembly (WASM)**: Client-side hosting model where the entire application runs in the browser using WebAssembly
+* **Blazor Server**: Server-side hosting model with a real-time SignalR connection
+* **Blazor WebApp**: The new hybrid/united model introduced in .NET 8 combining the benefits of Server and WebAssembly approaches
+* **MAUI Blazor**: For building cross-platform native applications using Blazor & MAUI
-This document provides an overview for the ABP Blazor UI integration and highlights some major features.
+This document provides an overview of the ABP Blazor UI integration and highlights some major features.
-### Getting Started
+## Getting Started
You can follow the documents below to start with the ABP and the Blazor UI now:
@@ -94,7 +97,7 @@ These libraries are selected as the base libraries and available to the applicat
> Bootstrap's JavaScript part is not used since the Blazorise library already provides the necessary functionalities to the Bootstrap components in a native way.
-> Beginning from June, 2021, the Blazorise library has dual licenses; open source & commercial. Based on your yearly revenue, you may need to buy a commercial license. See [this post](https://blazorise.com/news/announcing-2022-blazorise-plans-and-pricing-updates) to learn more. The Blazorise license is bundled with ABP and commercial customers doesn’t need to buy an extra Blazorise license.
+> Beginning from June, 2021, the Blazorise library has dual licenses; open source & commercial. Based on your yearly revenue, you may need to buy a commercial license. See [this post](https://blazorise.com/news/announcing-2022-blazorise-plans-and-pricing-updates) to learn more. The Blazorise license is bundled with ABP and commercial customers doesn't need to buy an extra Blazorise license.
### The Layout
diff --git a/docs/en/framework/ui/blazor/theming.md b/docs/en/framework/ui/blazor/theming.md
index 0c7d6f8406..9a056580bb 100644
--- a/docs/en/framework/ui/blazor/theming.md
+++ b/docs/en/framework/ui/blazor/theming.md
@@ -27,7 +27,7 @@ Currently, three themes are **officially provided**:
* The [Basic Theme](basic-theme.md) is the minimalist theme with the plain Bootstrap style. It is **open source and free**.
* The [Lepton Theme](https://abp.io/themes) is a **commercial** theme developed by the core ABP team and is a part of the [ABP](https://abp.io/) license.
-* The [LeptonX Theme](https://x.leptontheme.com/) is a theme that has a [commercial](https://docs.abp.io/en/commercial/latest/themes/lepton-x/blazor) and a [lite](../../../ui-themes/lepton-x-lite/blazor.md) version.
+* The [LeptonX Theme](https://x.leptontheme.com/) is a theme that has a [commercial](../../../ui-themes/lepton-x/blazor.md) and a [lite](../../../ui-themes/lepton-x-lite/blazor.md) version.
## Overall
diff --git a/docs/en/framework/ui/mvc-razor-pages/tag-helpers/form-elements.md b/docs/en/framework/ui/mvc-razor-pages/tag-helpers/form-elements.md
index 9230075ed3..b59ecf8dd3 100644
--- a/docs/en/framework/ui/mvc-razor-pages/tag-helpers/form-elements.md
+++ b/docs/en/framework/ui/mvc-razor-pages/tag-helpers/form-elements.md
@@ -10,7 +10,7 @@ See the [form elements demo page](https://bootstrap-taghelpers.abp.io/Components
## abp-input
-`abp-input` tag creates a Bootstrap form input for a given c# property. It uses [Asp.Net Core Input Tag Helper](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-7.0#the-input-tag-helper) in background, so every data annotation attribute of `input` tag helper of Asp.Net Core is also valid for `abp-input`.
+`abp-input` tag creates a Bootstrap form input for a given c# property. It uses [Asp.Net Core Input Tag Helper](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-9.0#the-input-tag-helper) in background, so every data annotation attribute of `input` tag helper of Asp.Net Core is also valid for `abp-input`.
Usage:
@@ -89,7 +89,7 @@ You can set some of the attributes on your c# property, or directly on HTML tag.
* `required-symbol`: Adds the required symbol `(*)` to the label when the input is required. The default value is `True`.
* `floating-label`: Sets the label as floating label. The default value is `False`.
-`asp-format`, `name` and `value` attributes of [Asp.Net Core Input Tag Helper](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-7.0#the-input-tag-helper) are also valid for `abp-input` tag helper.
+`asp-format`, `name` and `value` attributes of [Asp.Net Core Input Tag Helper](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-9.0#the-input-tag-helper) are also valid for `abp-input` tag helper.
### Label & Localization
@@ -101,7 +101,7 @@ You can set the label of the input in several ways:
## abp-select
-`abp-select` tag creates a Bootstrap form select for a given c# property. It uses [ASP.NET Core Select Tag Helper](https://docs.microsoft.com/tr-tr/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-3.1#the-select-tag-helper) in background, so every data annotation attribute of `select` tag helper of ASP.NET Core is also valid for `abp-select`.
+`abp-select` tag creates a Bootstrap form select for a given c# property. It uses [ASP.NET Core Select Tag Helper](https://docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-9.0#the-select-tag-helper) in background, so every data annotation attribute of `select` tag helper of ASP.NET Core is also valid for `abp-select`.
`abp-select` tag needs a list of `Microsoft.AspNetCore.Mvc.Rendering.SelectListItem ` to work. It can be provided by `asp-items` attriube on the tag or `[SelectItems()]` attribute on c# property. (if you are using [abp-dynamic-form](dynamic-forms.md), c# attribute is the only way.)
@@ -432,4 +432,4 @@ newPicker.insertAfter($('body'));
* `startDateName`: Sets the name of the hidden start date input.
* `endDateName`: Sets the name of the hidden end date input.
* `dateName`: Sets the name of the hidden date input.
-* Other [datepicker options](https://www.daterangepicker.com/#options). Eg: `startDate: "2020-01-01"`.
\ No newline at end of file
+* Other [datepicker options](https://www.daterangepicker.com/#options). Eg: `startDate: "2020-01-01"`.
diff --git a/docs/en/modules/account/idle-session-timeout.md b/docs/en/modules/account/idle-session-timeout.md
index 069e6db665..231ea31e7d 100644
--- a/docs/en/modules/account/idle-session-timeout.md
+++ b/docs/en/modules/account/idle-session-timeout.md
@@ -6,7 +6,7 @@ The `Idle Session Timeout` feature allows you to automatically log out users aft
You can enable/disable the `Idle Session Timeout` feature in the `Setting > Account > Idle Session Timeout` page.
-The default idle session timeout is 1 hour. You can change it by selecting a different value from the dropdown list or entering a custom value(in minutes).
+The default idle session timeout is 1 hour. You can change it by selecting a different value from the dropdown list or entering a custom value (in minutes).

diff --git a/docs/en/samples/index.md b/docs/en/samples/index.md
index 8c8733408d..6aea3d3fa5 100644
--- a/docs/en/samples/index.md
+++ b/docs/en/samples/index.md
@@ -1,6 +1,6 @@
# ABP Samples
-Here, a list of official samples built with ABP.
+This document provides a list of samples built with ABP. Each sample is briefly explained below, along with its live demo (if available), source code, and tutorial links (where applicable).
## Event Hub
@@ -11,13 +11,13 @@ A reference application built with ABP. It implements the Domain Driven Design w
## eShopOnAbp
+> ⚠️ **Important Notice**
+> This project, "eShopOnAbp," is outdated. It served as a reference project for microservice architecture using the ABP Framework, but we now recommend using the [ABP Microservice Solution Template](https://abp.io/docs/latest/solution-templates/microservice) for new projects.
+
Reference microservice solution built with ABP and .NET.
* [Source code](https://github.com/abpframework/eShopOnAbp)
-> ⚠️ **Important Notice**
-> This project, "eShopOnAbp," is outdated. It served as a reference project for microservice architecture using the ABP Framework, but we now recommend using the [ABP Microservice Solution Template](https://abp.io/docs/latest/solution-templates/microservice) for new projects.
-
## CMS Kit Demo
A minimal example website built with the [CMS Kit module](../modules/cms-kit/index.md).
@@ -34,92 +34,48 @@ A middle-size CRM application built with ABP.
## Book Store
-A simple CRUD application to show basic principles of developing an application with ABP. The same sample was implemented with different technologies and different modules.
-
-### With Open Source Modules
-
-The following samples uses only the open source (free) modules.
+A simple CRUD application to show basic principles of developing an application with ABP. The same sample was implemented with different technologies and different modules:
* **Book Store: Razor Pages UI & Entity Framework Core**
* [Tutorial](../tutorials/book-store/part-01.md?UI=MVC&DB=EF)
* [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
+ * [Download source code (with PRO modules) *](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-mvc-ef)
* **Book Store: Blazor UI & Entity Framework Core**
* [Tutorial](../tutorials/book-store/part-01.md?UI=Blazor&DB=EF)
* [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
+ * [Download source code (with PRO modules) *](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-blazor-efcore)
* **Book Store: Angular UI & MongoDB**
* [Tutorial](../tutorials/book-store/part-01.md?UI=NG&DB=Mongo)
* [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)
+ * [Download source code (with PRO modules) *](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-angular-mongodb)
* **Book Store: Modular application (Razor Pages UI & EF Core)**
* [Source code](https://github.com/abpframework/abp-samples/tree/master/BookStore-Modular)
-### With Pro Modules
+If you want to create the BookStore application and generate CRUD pages automatically with ABP Suite, please refer to the [Book Store Application (with ABP Suite) tutorial](../tutorials/book-store-with-abp-suite/part-01.md). Also, you can follow the [Mobile Application Development Tutorials](../tutorials/mobile/index.md), if you want to implement the CRUD operations for [MAUI](../tutorials/mobile/maui/index.md) & [React Native](../tutorials/mobile/react-native/index.md) mobile applications.
-The following samples uses the pro modules.
+> **Note:** _Downloading source codes (with PRO modules) \*_ require an active [ABP License](https://abp.io/pricing).
-- **Book Store: Razor Pages (MVC) UI & Entity Framework Core**
- - [Tutorial](../tutorials/book-store/part-01.md?UI=MVC&DB=EF)
- - [Download the source code](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-mvc-ef)
-- **Book Store: Blazor UI & Entity Framework Core**
- - [Tutorial](../tutorials/book-store/part-01.md?UI=Blazor&DB=EF)
- - [Download the source code](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-blazor-efcore)
-- **Book Store: Angular UI & MongoDB**
- - [Tutorial](../tutorials/book-store/part-01.md?UI=NG&DB=Mongo)
- - [Download the source code](https://abp.io/Account/Login?returnUrl=/api/download/samples/bookstore-angular-mongodb)
+## ModularCRM
+
+A modular monolith application that demonstrates how to create, compose, and communicate between application modules to build a modular web application:
+
+* **ModularCRM: Razor Pages UI & Entity Framework Core**
+ * [Tutorial](../tutorials/modular-crm/part-01.md?UI=MVC&DB=EF)
+ * [Source code](https://github.com/abpframework/abp-samples/tree/master/ModularCrm)
+
+## CloudCrm
+
+> This tutorial & sample application is suitable for those who have an [ABP Business or a higher license](https://abp.io/pricing).
+
+A microservice solution that shows how to start a new microservice solution, create services and communicate between these services. It's a reference tutorial to learn to use these services from a web application through an API gateway and automatically generate CRUD pages using the ABP Suite tool:
+
+* **CloudCRM: Razor Pages UI & Entity Framework Core**
+ * [Tutorial](../tutorials/microservice/part-01.md?UI=MVC&DB=EF)
+ * [Download source code](https://abp.io/api/download/samples/cloud-crm-mvc-ef)
## Other Samples
-* **Event Organizer**: A sample application to create events (meetups) and allow others to register the events. Developed using EF Core and Blazor UI.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/EventOrganizer)
- * [Article](https://abp.io/community/articles/creating-an-event-organizer-application-with-the-blazor-ui-wbe0sf2z)
-* **Entity Framework Migrations**: A solution to demonstrate how to split your application into multiple databases each database contains different modules.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/EfCoreMigrationDemo)
- * [EF Core database migrations document](../framework/data/entity-framework-core/migrations.md)
-* **SignalR Demo**: A simple chat application that allows to send and receive messages among authenticated users.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/SignalRDemo)
- * [SignalR Integration document](../framework/real-time/signalr.md)
-* **Real Time Messaging In A Distributed Architecture** (using SingalR & RabbitMQ)
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/SignalRTieredDemo)
- * [Article](https://abp.io/community/articles/real-time-messaging-in-a-distributed-architecture-using-abp-framework-singalr-rabbitmq-daf47e17)
-* **Dashboard Demo**: A simple application to show how to use the widget system for the ASP.NET Core MVC UI.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/DashboardDemo)
- * [Widget documentation](../framework/ui/mvc-razor-pages/widgets.md)
-* **RabbitMQ Event Bus Demo**: A solution consists of two applications communicating to each other via distributed events with RabbitMQ integration.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/RabbitMqEventBus)
- * [Distributed event bus document](../framework/infrastructure/event-bus/distributed)
- * [RabbitMQ distributed event bus integration document](../framework/infrastructure/event-bus/distributed/rabbitmq.md)
-* **Text Templates Demo**: Shows different use cases of the text templating system.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/TextTemplateDemo)
- * [Text templating documentation](../framework/infrastructure/text-templating)
-* **Stored Procedure Demo**: Demonstrates how to use stored procedures, database views and functions with best practices.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/StoredProcedureDemo)
-* **Passwordless Authentication**: Shows how to add a custom token provider to authenticate a user with a link, instead of entering a password.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/PasswordlessAuthentication)
- * [Article](https://abp.io/community/articles/implementing-passwordless-authentication-with-asp.net-core-identity-c25l8koj)
-* **Authentication Customization**: A solution to show how to customize the authentication for ASP.NET Core MVC / Razor Pages applications.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/Authentication-Customization)
- * Related articles:
- * [Azure Active Directory Authentication](https://abp.io/community/articles/how-to-use-the-azure-active-directory-authentication-for-mvc-razor-page-applications-4603b9cf)
- * [Customize the Login Page](https://abp.io/community/articles/how-to-customize-the-login-page-for-mvc-razor-page-applications-9a40f3cd)
- * [Customize the SignIn Manager](https://abp.io/community/articles/how-to-customize-the-signin-manager-3e858753)
-* **GRPC Demo**: Shows how to add a gRPC service to an ABP based web application and consume it from a console application.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/GrpcDemo)
-* **Telerik Blazor Integration**: Shows how to install and use Telerik Blazor components with ABP.
- * [Article](https://abp.io/community/articles/how-to-integrate-the-telerik-blazor-components-to-the-abp-blazor-ui-q8g31abb)
-* **Angular Material Integration**: Implemented the web application tutorial using the Angular Material library.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/AcmeBookStoreAngularMaterial)
- * [Article](https://abp.io/community/articles/using-angular-material-components-with-the-abp-framework-af8ft6t9)
-* **DevExtreme Angular Component Integration**: How to install and use DevExtreme components in the ABP Angular UI.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/DevExtreme-Angular)
- * [Article](https://abp.io/community/articles/using-devextreme-angular-components-with-the-abp-framework-x5nyvj3i)
-* **DevExtreme MVC / Razor Pages Component Integration**: How to install and use DevExtreme components in the ABP MVC / Razor Pages UI.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/DevExtreme-Mvc)
- * [Article](https://abp.io/community/articles/using-devextreme-components-with-the-abp-framework-zb8z7yqv)
-* **Syncfusion Blazor Integration**: Shows how to install and integrate Syncfusion UI the ABP Blazor UI.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/SyncfusionSample)
- * [Article](https://abp.io/community/articles/using-syncfusion-components-with-the-abp-framework-5ccvi8kc)
-* **Empty ASP.NET Core Application**: The most basic ASP.NET Core application with ABP installed.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/BasicAspNetCoreApplication)
- * [Documentation](../get-started/empty-aspnet-core-application.md)
-* **Using Elsa Workflow with ABP**: Shows how to use the Elsa Core workflow library within an ABP-based application.
- * [Source code](https://github.com/abpframework/abp-samples/tree/master/ElsaDemo)
- * [Article](https://abp.io/community/articles/using-elsa-workflow-with-the-abp-framework-773siqi9)
+ABP Platform provides many sample applications demonstrating various use cases and integrations. You can:
+
+* Browse all sample applications in the [abp-samples repository](https://github.com/abpframework/abp-samples).
+* Read detailed articles and tutorials in the [ABP Community](https://abp.io/community), which are shared by ABP Community & Contributors.
\ No newline at end of file
diff --git a/docs/en/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action.md b/docs/en/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action.md
index 9aa9e5df83..d6533ef6ec 100644
--- a/docs/en/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action.md
+++ b/docs/en/solution-templates/layered-web-application/deployment/azure-deployment/step3-deployment-github-action.md
@@ -295,7 +295,7 @@ jobs:
environment:
name: 'Production'
url: ${{ steps.deploy-to-webapp-3.outputs.webapp-url }}
-
+ steps:
- name: Download artifact from apihost
uses: actions/download-artifact@v4
with:
diff --git a/docs/en/solution-templates/layered-web-application/deployment/deployment-docker-compose.md b/docs/en/solution-templates/layered-web-application/deployment/deployment-docker-compose.md
index a9e106221b..fe2d226d53 100644
--- a/docs/en/solution-templates/layered-web-application/deployment/deployment-docker-compose.md
+++ b/docs/en/solution-templates/layered-web-application/deployment/deployment-docker-compose.md
@@ -15,7 +15,7 @@ This guide will guide you through how to build docker images for your applicatio
## Building Docker Images
-Each application contains a dockerfile called `Dockerfile.local` for building the docker image. As the naming implies, these Dockerfiles are not multi-stage Dockerfiles and require the project to be built in `Release` mode to create the image. Currently, if you are building your images using CI & CD pipeline, you either need to include the SDK to your pipeline before building the images or add your own [multi-stage dockerfiles](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/docker/building-net-docker-images?view=aspnetcore-7.0).
+Each application contains a dockerfile called `Dockerfile.local` for building the docker image. As the naming implies, these Dockerfiles are not multi-stage Dockerfiles and require the project to be built in `Release` mode to create the image. Currently, if you are building your images using CI & CD pipeline, you either need to include the SDK to your pipeline before building the images or add your own [multi-stage dockerfiles](https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/docker/building-net-docker-images?view=aspnetcore-9.0).
Since they are not multi-staged Dockerfiles, if you want to build the images individually, you can navigate to the related to-be-hosted application folder and run the following command:
@@ -31,7 +31,7 @@ docker build -f Dockerfile.local -t mycompanyname/myappname:version .
To manually build your application image.
-To ease the process, application templates provide a build script to build all the images with a single script under `etc/build` folder named `build-images-locally.ps1`.
+To ease the process, application templates provide a build script to build all the images with a single script under `etc/docker-compose` folder named `build-images-locally.ps1`.
Based on your application name, UI and type, a build image script will be generated.
{{ if UI == "MVC"}}
@@ -204,8 +204,8 @@ DbMigrator is a console application that is used to migrate the database of your
`Dockerfile.local` is provided under this project as below;
```dockerfile
-FROM mcr.microsoft.com/dotnet/aspnet:7.0
-COPY bin/Release/net7.0/publish/ app/
+FROM mcr.microsoft.com/dotnet/aspnet:9.0
+COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "BookStore.DbMigrator.dll"]
```
@@ -226,7 +226,7 @@ docker build -f Dockerfile.local -t acme/bookstore-db-migrator:latest . #Builds
In the **WebModule** under authentication configuration, there is an extra configuration for containerized environment support:
```csharp
-if (Convert.ToBoolean(configuration["AuthServer:IsContainerizedOnLocalhost"]))
+if (Convert.ToBoolean(configuration["AuthServer:IsOnK8s"]))
{
context.Services.Configure("oidc", options =>
{
@@ -268,13 +268,13 @@ if (Convert.ToBoolean(configuration["AuthServer:IsContainerizedOnLocalhost"]))
This is used when the **AuthServer is running on docker containers(or pods)** to configure the redirection URLs for the internal network and the web. The application must be redirected to real DNS (localhost in this case) when the `/authorize` and `/logout` requests over the browser but handle the token validation inside the isolated network without going out to the internet. `"AuthServer:MetaAddress"` appsetting should indicate the container/pod service name while the `AuthServer:Authority` should be pointing to real DNS for the browser to redirect.
-The `appsettings.json` file does not contain `AuthServer:IsContainerizedOnLocalhost` and `AuthServer:MetaAddress` settings since they are used for orchestrated deployment scenarios, you can see these settings are overridden by the `docker-compose.yml` file.
+The `appsettings.json` file does not contain `AuthServer:IsOnK8s` and `AuthServer:MetaAddress` settings since they are used for orchestrated deployment scenarios, you can see these settings are overridden by the `docker-compose.yml` file.
`Dockerfile.local` is provided under this project as below;
```dockerfile
-FROM mcr.microsoft.com/dotnet/aspnet:7.0
-COPY bin/Release/net7.0/publish/ app/
+FROM mcr.microsoft.com/dotnet/aspnet:9.0
+COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "Acme.BookStore.Web.dll"]
```
@@ -289,11 +289,11 @@ docker build -f Dockerfile.local -t acme/bookstore-web:latest . #Builds the imag
{{ end }} {{ if Tiered == "No" }}MVC/Razor Pages application is a server-side rendering application that contains both the OpenID-provider and the Http.Api endpoints within self; it will be a single application to deploy. `Dockerfile.local` is provided under this project as below;
```dockerfile
-FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
-COPY bin/Release/net7.0/publish/ app/
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
+COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
-FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
RUN dotnet dev-certs https -v -ep authserver.pfx -p 2D7AA457-5D33-48D6-936F-C48E5EF468ED
@@ -318,36 +318,17 @@ if (!hostingEnvironment.IsDevelopment())
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});
- PreConfigure(builder =>
+ PreConfigure(serverBuilder =>
{
- builder.AddSigningCertificate(GetSigningCertificate(hostingEnvironment, configuration));
- builder.AddEncryptionCertificate(GetSigningCertificate(hostingEnvironment, configuration));
- builder.SetIssuer(new Uri(configuration["AuthServer:Authority"]));
+ serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", configuration["AuthServer:CertificatePassPhrase"]!);
+ serverBuilder.SetIssuer(new Uri(configuration["AuthServer:Authority"]!));
});
}
```
This configuration disables the *DevelopmentEncryptionAndSigningCertificate* and uses a self-signed certificate called `authserver.pfx`. for **signing and encrypting the tokens**. This certificate is created when the docker image is built using the `dotnet dev-certs` tooling. It is a sample-generated certificate, and it is **recommended** to update it for the production environment. You can check the [OpenIddict Encryption and signing credentials documentation](https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html) for different options and customization.
-The `GetSigningCertificate` method is a private method located under the same **WebModule**:
-
-```csharp
-private X509Certificate2 GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration)
-{
- var fileName = "authserver.pfx";
- var passPhrase = "2D7AA457-5D33-48D6-936F-C48E5EF468ED";
- var file = Path.Combine(hostingEnv.ContentRootPath, fileName);
-
- if (!File.Exists(file))
- {
- throw new FileNotFoundException($"Signing Certificate couldn't found: {file}");
- }
-
- return new X509Certificate2(file, passPhrase);
-}
-```
-
-> You can always create any self-signed certificate using any other tooling outside the Dockerfile. You need to remember to set them as **embedded resource** since the `GetSigningCertificate` method will be checking this file physically.
+> You can always create any self-signed certificate using any other tooling outside the Dockerfile. You need to remember to set them as **embedded resource**.
If you don't want to use the `build-images-locally.ps1` to build the images or to build this image individually and manually, navigate to the **Web** folder and run:
@@ -369,7 +350,7 @@ docker build -f Dockerfile.local -t acme/bookstore-web:latest . #Builds the imag
In the **BlazorModule** under authentication configuration, there is an extra configuration for containerized environment support:
```csharp
-if (Convert.ToBoolean(configuration["AuthServer:IsContainerizedOnLocalhost"]))
+if (Convert.ToBoolean(configuration["AuthServer:IsOnK8s"]))
{
context.Services.Configure("oidc", options =>
{
@@ -411,13 +392,13 @@ if (Convert.ToBoolean(configuration["AuthServer:IsContainerizedOnLocalhost"]))
This is used when the **AuthServer is running on docker containers(or pods)** to configure the redirection URLs for the internal network and the web. The application must be redirected to real DNS (localhost in this case) when the `/authorize` and `/logout` requests over the browser but handle the token validation inside the isolated network without going out to the internet. `"AuthServer:MetaAddress"` appsetting should indicate the container/pod service name while the `AuthServer:Authority` should be pointing to real DNS for the browser to redirect.
-The `appsettings.json` file does not contain `AuthServer:IsContainerizedOnLocalhost` and `AuthServer:MetaAddress` settings since they are used for orchestrated deployment scenarios, you can see these settings are overridden by the `docker-compose.yml` file.
+The `appsettings.json` file does not contain `AuthServer:IsOnK8s` and `AuthServer:MetaAddress` settings since they are used for orchestrated deployment scenarios, you can see these settings are overridden by the `docker-compose.yml` file.
`Dockerfile.local` is provided under this project as below;
```dockerfile
-FROM mcr.microsoft.com/dotnet/aspnet:7.0
-COPY bin/Release/net7.0/publish/ app/
+FROM mcr.microsoft.com/dotnet/aspnet:9.0
+COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "Acme.BookStore.Blazor.dll"]
```
@@ -432,11 +413,11 @@ docker build -f Dockerfile.local -t acme/bookstore-blazor:latest . #Builds the i
{{ end }} {{ if Tiered == "No" }}Blazor Server application is a server-side rendering application that contains both the OpenID-provider and the Http.Api endpoints within self; it will be a single application to deploy. `Dockerfile.local` is provided under this project as below;
```dockerfile
-FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
-COPY bin/Release/net7.0/publish/ app/
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
+COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
-FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
RUN dotnet dev-certs https -v -ep authserver.pfx -p 2D7AA457-5D33-48D6-936F-C48E5EF468ED
@@ -461,36 +442,17 @@ if (!hostingEnvironment.IsDevelopment())
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});
- PreConfigure(builder =>
+ PreConfigure(serverBuilder =>
{
- builder.AddSigningCertificate(GetSigningCertificate(hostingEnvironment, configuration));
- builder.AddEncryptionCertificate(GetSigningCertificate(hostingEnvironment, configuration));
- builder.SetIssuer(new Uri(configuration["AuthServer:Authority"]));
+ serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", configuration["AuthServer:CertificatePassPhrase"]!);
+ serverBuilder.SetIssuer(new Uri(configuration["AuthServer:Authority"]!));
});
}
```
This configuration disables the *DevelopmentEncryptionAndSigningCertificate* and uses a self-signed certificate called `authserver.pfx`. for **signing and encrypting the tokens**. This certificate is created when the docker image is built using the `dotnet dev-certs` tooling. It is a sample-generated certificate, and it is **recommended** to update it for the production environment. You can check the [OpenIddict Encryption and signing credentials documentation](https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html) for different options and customization.
-The `GetSigningCertificate` method is a private method located under the same **BlazorModule**:
-
-```csharp
-private X509Certificate2 GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration)
-{
- var fileName = "authserver.pfx";
- var passPhrase = "2D7AA457-5D33-48D6-936F-C48E5EF468ED";
- var file = Path.Combine(hostingEnv.ContentRootPath, fileName);
-
- if (!File.Exists(file))
- {
- throw new FileNotFoundException($"Signing Certificate couldn't found: {file}");
- }
-
- return new X509Certificate2(file, passPhrase);
-}
-```
-
-> You can always create any self-signed certificate using any other tooling outside the dockerfile. You need to remember to set them as **embedded resource** since the `GetSigningCertificate` method will be checking this file physically.
+> You can always create any self-signed certificate using any other tooling outside the Dockerfile. You need to remember to set them as **embedded resource**.
If you don't want to use the `build-images-locally.ps1` to build the images or to build this image individually and manually, navigate to the **BlazorModule** folder and run:
@@ -562,7 +524,7 @@ server {
}
```
-This configuration allows returning the `dynamic-env.json` file as a static file, which ABP Angular application uses for environment variables in one of the first initial requests when rendering the page. **The `dynamic-env.json` file you need to override is located under `aspnet-core/etc/docker`** folder.
+This configuration allows returning the `dynamic-env.json` file as a static file, which ABP Angular application uses for environment variables in one of the first initial requests when rendering the page. **The `dynamic-env.json` file you need to override is located under `aspnet-core/etc/docker-compose`** folder.
{{ if Tiered == "No" }}
@@ -645,8 +607,8 @@ docker build -f Dockerfile.local -t acme/bookstore-angular:latest . #Builds the
The Blazor application uses [nginx:alpine-slim](https://hub.docker.com/layers/library/nginx/alpine-slim/images/sha256-0f859db466fda2c52f62b48d0602fb26867d98edbd62c26ae21414b3dea8d8f4?context=explore) base image to host the blazor application. You can modify the base image based on your preference in the `Dockerfile.local` which provided under the Blazor folder of your solution as below;
```dockerfile
-FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS build
-COPY bin/Release/net7.0/publish/ app/
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS build
+COPY bin/Release/net9.0/publish/ app/
FROM nginx:alpine-slim AS final
WORKDIR /usr/share/nginx/html
@@ -701,11 +663,11 @@ docker build -f Dockerfile.local -t acme/bookstore-blazor:latest . #Builds the i
This is the backend application that contains the openid-provider functionality as well. The `dockerfile.local` is located under the `Http.Api.Host` project as below;
```dockerfile
-FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
-COPY bin/Release/net7.0/publish/ app/
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
+COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
-FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
RUN dotnet dev-certs https -v -ep authserver.pfx -p 2D7AA457-5D33-48D6-936F-C48E5EF468ED
@@ -730,36 +692,17 @@ if (!hostingEnvironment.IsDevelopment())
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});
- PreConfigure(builder =>
+ PreConfigure(serverBuilder =>
{
- builder.AddSigningCertificate(GetSigningCertificate(hostingEnvironment, configuration));
- builder.AddEncryptionCertificate(GetSigningCertificate(hostingEnvironment, configuration));
- builder.SetIssuer(new Uri(configuration["AuthServer:Authority"]));
+ serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", configuration["AuthServer:CertificatePassPhrase"]!);
+ serverBuilder.SetIssuer(new Uri(configuration["AuthServer:Authority"]!));
});
}
```
This configuration disables the *DevelopmentEncryptionAndSigningCertificate* and uses a self-signed certificate called `authserver.pfx`. for **signing and encrypting the tokens**. This certificate is created when the docker image is built using the `dotnet dev-certs` tooling. It is a sample-generated certificate, and it is **recommended** to update it for the production environment. You can check the [OpenIddict Encryption and signing credentials documentation](https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html) for different options and customization.
-The `GetSigningCertificate` method is a private method located under the same **HttpApiHostModule**:
-
-```csharp
-private X509Certificate2 GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration)
-{
- var fileName = "authserver.pfx";
- var passPhrase = "2D7AA457-5D33-48D6-936F-C48E5EF468ED";
- var file = Path.Combine(hostingEnv.ContentRootPath, fileName);
-
- if (!File.Exists(file))
- {
- throw new FileNotFoundException($"Signing Certificate couldn't found: {file}");
- }
-
- return new X509Certificate2(file, passPhrase);
-}
-```
-
-> You can always create any self-signed certificate using any other tooling outside of the dockerfile. You need to keep in mind to set them as **embedded resource** since the `GetSigningCertificate` method will be checking this file physically.
+> You can always create any self-signed certificate using any other tooling outside the Dockerfile. You need to remember to set them as **embedded resource**.
If you don't want to use the `build-images-locally.ps1` to build the images or to build this image individually and manually, navigate to **Http.Api.Host** folder and run:
@@ -777,11 +720,11 @@ docker build -f Dockerfile.local -t acme/bookstore-api:latest . #Builds the imag
This is the backend application that contains the OpenID-provider functionality as well. The `dockerfile.local` is located under the `Http.Api.Host` project as below;
```dockerfile
-FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
-COPY bin/Release/net7.0/publish/ app/
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
+COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
-FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
RUN dotnet dev-certs https -v -ep authserver.pfx -p 2D7AA457-5D33-48D6-936F-C48E5EF468ED
@@ -806,36 +749,17 @@ if (!hostingEnvironment.IsDevelopment())
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});
- PreConfigure(builder =>
+ PreConfigure(serverBuilder =>
{
- builder.AddSigningCertificate(GetSigningCertificate(hostingEnvironment, configuration));
- builder.AddEncryptionCertificate(GetSigningCertificate(hostingEnvironment, configuration));
- builder.SetIssuer(new Uri(configuration["AuthServer:Authority"]));
+ serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", configuration["AuthServer:CertificatePassPhrase"]!);
+ serverBuilder.SetIssuer(new Uri(configuration["AuthServer:Authority"]!));
});
}
```
-This configuration disables the *DevelopmentEncryptionAndSigningCertificate* and uses a self-signed certificate called `authserver.pfx`. for **signing and encrypting the tokens**. This certificate is created when the docker image is built using the `dotnet dev-certs` tooling. It is a sample-generated certificate, and it is **recommended** to update it for the production environment. You can check the [OpenIddict Encryption and signing credentials documentation](https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html) for different customization options.
-
-The `GetSigningCertificate` method is a private method located under the same **HttpApiHostModule**:
-
-```csharp
-private X509Certificate2 GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration)
-{
- var fileName = "authserver.pfx";
- var passPhrase = "2D7AA457-5D33-48D6-936F-C48E5EF468ED";
- var file = Path.Combine(hostingEnv.ContentRootPath, fileName);
-
- if (!File.Exists(file))
- {
- throw new FileNotFoundException($"Signing Certificate couldn't found: {file}");
- }
-
- return new X509Certificate2(file, passPhrase);
-}
-```
+This configuration disables the *DevelopmentEncryptionAndSigningCertificate* and uses a self-signed certificate called `authserver.pfx`. for **signing and encrypting the tokens**. This certificate is created when the docker image is built using the `dotnet dev-certs` tooling. It is a sample-generated certificate, and it is **recommended** to update it for the production environment. You can check the [OpenIddict Encryption and signing credentials documentation](https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html) for different options and customization.
-> You can always create any self-signed certificate using any other tooling outside the dockerfile. You need to remember to set them as **embedded resource** since the `GetSigningCertificate` method will be checking this file physically.
+> You can always create any self-signed certificate using any other tooling outside the Dockerfile. You need to remember to set them as **embedded resource**.
If you don't want to use the `build-images-locally.ps1` to build the images or to build this image individually and manually, navigate to **Http.Api.Host** folder and run:
@@ -855,11 +779,11 @@ docker build -f Dockerfile.local -t acme/bookstore-api:latest . #Builds the imag
This is the openid-provider application, the authentication server, which should be individually hosted compared to non-tiered application templates. The `dockerfile.local` is located under the `AuthServer` project as below;
```dockerfile
-FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
-COPY bin/Release/net7.0/publish/ app/
+FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
+COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
-FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
+FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
RUN dotnet dev-certs https -v -ep authserver.pfx -p 2D7AA457-5D33-48D6-936F-C48E5EF468ED
@@ -884,36 +808,17 @@ if (!hostingEnvironment.IsDevelopment())
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});
- PreConfigure(builder =>
+ PreConfigure(serverBuilder =>
{
- builder.AddSigningCertificate(GetSigningCertificate(hostingEnvironment, configuration));
- builder.AddEncryptionCertificate(GetSigningCertificate(hostingEnvironment, configuration));
- builder.SetIssuer(new Uri(configuration["AuthServer:Authority"]));
+ serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", configuration["AuthServer:CertificatePassPhrase"]!);
+ serverBuilder.SetIssuer(new Uri(configuration["AuthServer:Authority"]!));
});
}
```
This configuration disables the *DevelopmentEncryptionAndSigningCertificate* and uses a self-signed certificate called `authserver.pfx`. for **signing and encrypting the tokens**. This certificate is created when the docker image is built using the `dotnet dev-certs` tooling. It is a sample-generated certificate, and it is **recommended** to update it for the production environment. You can check the [OpenIddict Encryption and signing credentials documentation](https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html) for different options and customization.
-The `GetSigningCertificate` method is a private method located under the same **AuthServerModule**:
-
-```csharp
-private X509Certificate2 GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration)
-{
- var fileName = "authserver.pfx";
- var passPhrase = "2D7AA457-5D33-48D6-936F-C48E5EF468ED";
- var file = Path.Combine(hostingEnv.ContentRootPath, fileName);
-
- if (!File.Exists(file))
- {
- throw new FileNotFoundException($"Signing Certificate couldn't found: {file}");
- }
-
- return new X509Certificate2(file, passPhrase);
-}
-```
-
-> You can always create any self-signed certificate using any other tooling outside the dockerfile. You need to remember to set them as **embedded resource** since the `GetSigningCertificate` method will be checking this file physically.
+> You can always create any self-signed certificate using any other tooling outside the Dockerfile. You need to remember to set them as **embedded resource**.
If you don't want to use the `build-images-locally.ps1` to build the images or to build this image individually and manually, navigate to the **AuthServer** folder and run:
@@ -927,8 +832,8 @@ docker build -f Dockerfile.local -t acme/bookstore-authserver:latest . #Builds t
This is the backend application that exposes the endpoints and swagger UI. It is not a multi-stage dockerfile; hence you need to have already built this application in **Release mode** to use this dockerfile. The `dockerfile.local` is located under the `Http.Api.Host` project as below;
```dockerfile
-FROM mcr.microsoft.com/dotnet/aspnet:7.0
-COPY bin/Release/net7.0/publish/ app/
+FROM mcr.microsoft.com/dotnet/aspnet:9.0
+COPY bin/Release/net9.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "Acme.BookStore.HttpApi.Host.dll"]
```
@@ -944,7 +849,7 @@ docker build -f Dockerfile.local -t acme/bookstore-api:latest . #Builds the imag
## Running Docker-Compose on Localhost
-Under the `etc/docker` folder, you can find the `docker-compose.yml` to run your application. To ease the running process, the template provides `run-docker.ps1` (and `run-docker.sh`) scripts that handle the HTTPS certificate creation, which is used in environment variables;
+Under the `etc/docker-compose` folder, you can find the `docker-compose.yml` to run your application. To ease the running process, the template provides `run-docker.ps1` (and `run-docker.sh`) scripts that handle the HTTPS certificate creation, which is used in environment variables;
```powershell
$currentFolder = $PSScriptRoot
@@ -1203,7 +1108,7 @@ This is the angular application we deploy on http://localhost:4200 by default us
> Don't forget to rebuild the `acme/bookstore-angular:latest` image after updating the `nginx.conf` file.
-The bookstore-angular service mounts the `etc/docker/dynamic-env.json` file to change the existing dynamic-env.json file, which is copied during image creation, to change the environment variables on deployment time instead of re-creating the docker image after each environmental variable change. **Do not forget to override the `dynamic-env.json` located under the `aspnet-core/etc/docker`** folder.
+The bookstore-angular service mounts the `etc/docker-compose/dynamic-env.json` file to change the existing dynamic-env.json file, which is copied during image creation, to change the environment variables on deployment time instead of re-creating the docker image after each environmental variable change. **Do not forget to override the `dynamic-env.json` located under the `aspnet-core/etc/docker-compose`** folder.
> If you are not using Docker with WSL, you may have problems with the volume mount permissions. You need to grant docker to be able to use the local file system. See this [SO answer](https://stackoverflow.com/a/20652410) for more information.
@@ -1438,7 +1343,7 @@ bookstore-web:
- Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc
- App__SelfUrl=https://localhost:44353
- AuthServer__RequireHttpsMetadata=false {{ if Tiered == "Yes" }}
- - AuthServer__IsContainerizedOnLocalhost=true
+ - AuthServer__IsOnK8s=true
- AuthServer__Authority=https://localhost:44334/
- RemoteServices__Default__BaseUrl=http://bookstore-api
- RemoteServices__AbpAccountPublic__BaseUrl=http://bookstore-authserver
@@ -1464,7 +1369,7 @@ This is the MVC/Razor Page application docker service is using the `acme/booksto
The MVC/Razor Page is a server-side rendering application that uses the **hybrid flow**. This flow uses **browser** to login/logout process to the OpenID-provider but issues the **access_token from the back-channel** (server-side). To achieve this functionality, the module class has extra `OpenIdConnectOptions` to override some of the events:
```csharp
-if (Convert.ToBoolean(configuration["AuthServer:IsContainerizedOnLocalhost"]))
+if (Convert.ToBoolean(configuration["AuthServer:IsOnK8s"]))
{
context.Services.Configure("oidc", options =>
{
@@ -1511,7 +1416,7 @@ if (Convert.ToBoolean(configuration["AuthServer:IsContainerizedOnLocalhost"]))
{{ if Tiered == "Yes" }}
-- `AuthServer__IsContainerizedOnLocalhost` is the configuration to enable the **OpenIdConnectOptions** to provide a different endpoint for the MetaAddress of the OpenID-provider and intercepting the URLS for *authorization* and *logout* endpoints.
+- `AuthServer__IsOnK8s` is the configuration to enable the **OpenIdConnectOptions** to provide a different endpoint for the MetaAddress of the OpenID-provider and intercepting the URLS for *authorization* and *logout* endpoints.
- `AuthServer__MetaAddress` is the `.well-known/openid-configuration` endpoint for issuing access_token and internal token validation. It is the containerized `http://bookstore-authserver` by default.
@@ -1691,7 +1596,7 @@ bookstore-blazor:
- Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc
- App__SelfUrl=https://localhost:44314
- AuthServer__RequireHttpsMetadata=false {{ if Tiered == "Yes" }}
- - AuthServer__IsContainerizedOnLocalhost=true
+ - AuthServer__IsOnK8s=true
- AuthServer__Authority=https://localhost:44334/
- AuthServer__MetaAddress=http://bookstore-authserver
- RemoteServices__Default__BaseUrl=http://bookstore-api
@@ -1718,7 +1623,7 @@ This is the Blazor Server application Docker service is using the `acme/bookstor
The Blazor Server is a server-side rendering application that uses the **hybrid flow**. This flow uses **browser** to login/logout process to the OpenID-provider but issues the **access_token from the back-channel** (server-side). To achieve this functionality, the module class has extra `OpenIdConnectOptions` to override some of the events:
```csharp
-if (Convert.ToBoolean(configuration["AuthServer:IsContainerizedOnLocalhost"]))
+if (Convert.ToBoolean(configuration["AuthServer:IsOnK8s"]))
{
context.Services.Configure("oidc", options =>
{
@@ -1765,7 +1670,7 @@ if (Convert.ToBoolean(configuration["AuthServer:IsContainerizedOnLocalhost"]))
{{ if Tiered == "Yes" }}
-- `AuthServer__IsContainerizedOnLocalhost` is the configuration to enable the **OpenIdConnectOptions** to provide a different endpoint for the MetaAddress of the OpenID-provider and intercept the URLS for *authorization* and *logout* endpoints.
+- `AuthServer__IsOnK8s` is the configuration to enable the **OpenIdConnectOptions** to provide a different endpoint for the MetaAddress of the OpenID-provider and intercept the URLS for *authorization* and *logout* endpoints.
- `AuthServer__MetaAddress` is the `.well-known/openid-configuration` endpoint for issuing the access_token and internal token validation. It is the containerized `http://bookstore-authserver` by default.
diff --git a/docs/en/solution-templates/layered-web-application/solution-structure.md b/docs/en/solution-templates/layered-web-application/solution-structure.md
index 680df73a59..3afd1b1274 100644
--- a/docs/en/solution-templates/layered-web-application/solution-structure.md
+++ b/docs/en/solution-templates/layered-web-application/solution-structure.md
@@ -214,3 +214,7 @@ This project is an application that hosts the API of the solution. It has its ow
Just like the default structure, this project contains the User Interface (UI) of the application. It contains razor pages, JavaScript files, style files, images and so on...
This project contains an `appsettings.json` file, but this time it does not have a connection string because it never connects to the database. Instead, it mainly contains the endpoint of the remote API server and the authentication server.
+
+### Docker Compose
+
+The **docker-compose** configuration files in the `etc/docker-compose` folder is configured to run the solution with Docker. See [Docker Deployment using Docker Compose](deployment/deployment-docker-compose.md) for more information.
\ No newline at end of file
diff --git a/docs/en/studio/monitoring-applications.md b/docs/en/studio/monitoring-applications.md
index 645df15418..6d0c5523a3 100644
--- a/docs/en/studio/monitoring-applications.md
+++ b/docs/en/studio/monitoring-applications.md
@@ -48,7 +48,7 @@ public override void ConfigureServices(ServiceConfigurationContext context)
In this tab, you can view comprehensive overall information. You have the option to search by application name and filter by application state. To reset all filters, use the *Clear Filters* button. When you apply a filter header informations gonna refresh by filtered applications.
-- `Apps Running`: The number of applications running. It includes CLI and C# applications. In the example two C# microservice applications and one CLI application is running.
+- `Apps Running`: The number of applications running. It includes only C# applications. In the example, nine C# microservice applications are running.
- `Requests`: The number of HTTP requests received by all C# applications.
- `Events`: The number of [Distributed Event](../framework/infrastructure/event-bus/distributed) sent or received by all C# applications.
- `Exceptions`: The number of exceptions thrown by all C# applications.
diff --git a/docs/en/studio/running-applications.md b/docs/en/studio/running-applications.md
index 9e266ef7a9..5392250153 100644
--- a/docs/en/studio/running-applications.md
+++ b/docs/en/studio/running-applications.md
@@ -230,3 +230,11 @@ CLI applications uses the [powershell](https://learn.microsoft.com/en-us/powersh
- `Remove`: This option allows you to delete the selected application.
> When CLI applications start chain icon won't be visible, because only C# applications can connect the ABP Studio.
+
+## Docker Compose
+
+You can manually run applications using [Docker Compose](https://docs.docker.com/compose/). This allows for easy setup and management of multi-container Docker applications. To get started, ensure you have Docker and Docker Compose installed on your machine.
+
+Refer to the [Deployment with Docker Compose](../solution-templates/layered-web-application/deployment/deployment-docker-compose.md) documentation for detailed instructions on how to configure and run your applications using `docker-compose`.
+
+> Note: The **Docker Compose** is not available in the ABP Studio interface.
\ No newline at end of file
diff --git a/docs/en/tutorials/modular-crm/images/abp-studio-ordering-swagger-ui-in-browser.png b/docs/en/tutorials/modular-crm/images/abp-studio-ordering-swagger-ui-in-browser.png
index 1318691ae9..feb6627be7 100644
Binary files a/docs/en/tutorials/modular-crm/images/abp-studio-ordering-swagger-ui-in-browser.png and b/docs/en/tutorials/modular-crm/images/abp-studio-ordering-swagger-ui-in-browser.png differ
diff --git a/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-order-execute.png b/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-order-execute.png
index b0f384f15d..6d4f5320ee 100644
Binary files a/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-order-execute.png and b/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-order-execute.png differ
diff --git a/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-product-execute.png b/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-product-execute.png
index e07804e37d..c85348933a 100644
Binary files a/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-product-execute.png and b/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-product-execute.png differ
diff --git a/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-product-try.png b/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-product-try.png
index 52a99ce8fa..8229656886 100644
Binary files a/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-product-try.png and b/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-create-product-try.png differ
diff --git a/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-in-browser.png b/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-in-browser.png
index 1b5fec9205..d412e0c509 100644
Binary files a/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-in-browser.png and b/docs/en/tutorials/modular-crm/images/abp-studio-swagger-ui-in-browser.png differ
diff --git a/docs/en/tutorials/modular-crm/part-03.md b/docs/en/tutorials/modular-crm/part-03.md
index 3d8896d8a5..2dabfc54eb 100644
--- a/docs/en/tutorials/modular-crm/part-03.md
+++ b/docs/en/tutorials/modular-crm/part-03.md
@@ -387,7 +387,10 @@ Configure(options =>
options.ConventionalControllers.Create(typeof(ModularCrmModule).Assembly);
//ADD THE FOLLOWING LINE:
- options.ConventionalControllers.Create(typeof(ProductsApplicationModule).Assembly);
+ options.ConventionalControllers.Create(typeof(ProductsApplicationModule).Assembly, settings =>
+ {
+ settings.RootPath = "products";
+ });
});
````
@@ -409,7 +412,7 @@ Once you see the user interface of the web application, type `/swagger` at the e

-Expand the `/api/app/product` API and click the *Try it out* button as shown in the following figure:
+Expand the `/api/products/product` API and click the *Try it out* button as shown in the following figure:

diff --git a/docs/en/tutorials/modular-crm/part-05.md b/docs/en/tutorials/modular-crm/part-05.md
index a489548b65..59aa56f2f4 100644
--- a/docs/en/tutorials/modular-crm/part-05.md
+++ b/docs/en/tutorials/modular-crm/part-05.md
@@ -345,7 +345,9 @@ public class OrderAppService : OrderingAppService, IOrderAppService
}
````
-Open the `ModularCrmModule` class in the main application's solution (the `ModularCrm` solution), find the `ConfigureAutoApiControllers` method and add the following lines inside that method:
+### Exposing Application Services as HTTP API Controllers
+
+After implementing the application service, now we need to create HTTP API endpoints for the ordering module. For that purpose, open the `ModularCrmModule` class in the main application's solution (the `ModularCrm` solution), find the `ConfigureAutoApiControllers` method and add the following lines inside that method:
````csharp
private void ConfigureAutoApiControllers()
@@ -353,10 +355,16 @@ private void ConfigureAutoApiControllers()
Configure(options =>
{
options.ConventionalControllers.Create(typeof(ModularCrmModule).Assembly);
- options.ConventionalControllers.Create(typeof(ProductsApplicationModule).Assembly);
+ options.ConventionalControllers.Create(typeof(ProductsApplicationModule).Assembly, settings =>
+ {
+ settings.RootPath = "products";
+ });
//ADD THE FOLLOWING LINE:
- options.ConventionalControllers.Create(typeof(OrderingModule).Assembly);
+ options.ConventionalControllers.Create(typeof(OrderingModule).Assembly, settings =>
+ {
+ settings.RootPath = "orders";
+ });
});
}
````
@@ -373,7 +381,7 @@ Once you see the user interface of the web application, type `/swagger` at the e

-Expand the `/api/app/order` API and click the *Try it out* button. Then, create a few orders by filling in the request body and clicking the *Execute* button:
+Expand the `/api/orders/order` API and click the *Try it out* button. Then, create a few orders by filling in the request body and clicking the *Execute* button:

diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs
index 9d1bac7f5f..115d6eeb02 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Pagination/AbpPaginationTagHelperService.cs
@@ -106,11 +106,11 @@ public class AbpPaginationTagHelperService : AbpTagHelperService GetPreviousButtonAsync(TagHelperContext context, TagHelperOutput output)
{
var localizationKey = "PagerPrevious";
- var currentPage = TagHelper.Model.CurrentPage == 1
- ? TagHelper.Model.CurrentPage.ToString()
- : (TagHelper.Model.CurrentPage - 1).ToString();
+ var currentPage = TagHelper.Model.CurrentPage > 1
+ ? (TagHelper.Model.CurrentPage - 1).ToString()
+ : "1";
return
- "