From 56e8f09b5136847e2c27ca4f134b5e8534f9d65e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SAL=C4=B0H=20=C3=96ZKARA?= Date: Fri, 27 Feb 2026 15:44:52 +0300 Subject: [PATCH] Add Blazor client proxy notes and package fixes Update modular-crm tutorial docs to cover Blazor WebApp specifics: adjust package-selection text to include the ModularCrm.Client package (with proper pluralization) in parts 02 and 04, and add instructions for configuring HTTP client proxies in the ModularCrmClientModule for the Catalog (part-03) and Ordering (part-05) modules. Also note that the respective .Blazor packages must be installed for both ModularCrm and ModularCrm.Client. --- docs/en/tutorials/modular-crm/part-02.md | 2 +- docs/en/tutorials/modular-crm/part-03.md | 26 ++++++++++++++++++++++++ docs/en/tutorials/modular-crm/part-04.md | 2 +- docs/en/tutorials/modular-crm/part-05.md | 26 ++++++++++++++++++++++++ 4 files changed, 54 insertions(+), 2 deletions(-) diff --git a/docs/en/tutorials/modular-crm/part-02.md b/docs/en/tutorials/modular-crm/part-02.md index 06aae6eac3..9c9f679732 100644 --- a/docs/en/tutorials/modular-crm/part-02.md +++ b/docs/en/tutorials/modular-crm/part-02.md @@ -54,7 +54,7 @@ When you click the *OK* button, ABP Studio opens the *Install Module* dialog: ![abp-studio-module-installation-dialog-for-catalog](images/abp-studio-module-installation-dialog-for-catalog-blazor-webapp.png) {{end}} -Select the `ModularCrm.Catalog` and {{if UI == "MVC"}}`ModularCrm.Catalog.UI`{{else if UI == "BlazorWebApp"}}`ModularCrm.Catalog.Blazor`{{end}} packages from the left area and ensure the `ModularCrm` package from the middle area was checked as shown in the preceding figure. Finally, click _OK_. +Select the `ModularCrm.Catalog` and {{if UI == "MVC"}}`ModularCrm.Catalog.UI`{{else if UI == "BlazorWebApp"}}`ModularCrm.Catalog.Blazor`{{end}} packages from the left area and ensure the {{if UI == "MVC"}}`ModularCrm`{{else if UI == "BlazorWebApp"}}`ModularCrm` and `ModularCrm.Client`{{end}} package{{if UI == "BlazorWebApp"}}s were{{else}} was{{end}} checked in the middle area as shown in the preceding figure. Finally, click _OK_. ## Building the Main Application diff --git a/docs/en/tutorials/modular-crm/part-03.md b/docs/en/tutorials/modular-crm/part-03.md index a8f1f2a0c7..66442455d3 100644 --- a/docs/en/tutorials/modular-crm/part-03.md +++ b/docs/en/tutorials/modular-crm/part-03.md @@ -383,6 +383,32 @@ This will tell the ABP framework to create API controllers for the application s Now, ABP will automatically expose the application services defined in the `ModularCrm.Catalog` project as API controllers. The next section will use these API controllers to create some example products. +{{if UI == "BlazorWebApp"}} + +### Configuring Client Proxies for the Catalog Module + +Since the Blazor WebApp template has a separate `ModularCrm.Client` project, configure HTTP client proxies for the Catalog contracts in the `ModularCrmClientModule` class: + +````csharp +using ModularCrm.Catalog; + +[DependsOn( + typeof(CatalogContractsModule) + // ...other dependencies +)] +public class ModularCrmClientModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies(typeof(CatalogContractsModule).Assembly); + } +} +```` + +Also ensure the `ModularCrm.Catalog.Blazor` package is installed for both the `ModularCrm` and `ModularCrm.Client` projects. + +{{end}} + ### Creating Example Products This section will create a few example products using the [Swagger UI](../../framework/api-development/swagger.md). Thus, you will have some sample products to show on the UI. diff --git a/docs/en/tutorials/modular-crm/part-04.md b/docs/en/tutorials/modular-crm/part-04.md index 554c34acd1..bb95577662 100644 --- a/docs/en/tutorials/modular-crm/part-04.md +++ b/docs/en/tutorials/modular-crm/part-04.md @@ -92,7 +92,7 @@ Select the `ModularCrm.Ordering` module and check the *Install this module* opti ![abp-studio-install-module-dialog](images/abp-studio-install-module-dialog-blazor-webapp.png) {{end}} -Select the `ModularCrm.Ordering` and {{if UI == "MVC"}}`ModularCrm.Ordering.UI`{{else if UI == "BlazorWebApp"}}`ModularCrm.Ordering.Blazor`{{end}} packages from the left area and ensure the `ModularCrm` package from the middle area was checked as shown in the preceding figure. Finally, click _OK_. +Select the `ModularCrm.Ordering` and {{if UI == "MVC"}}`ModularCrm.Ordering.UI`{{else if UI == "BlazorWebApp"}}`ModularCrm.Ordering.Blazor`{{end}} packages from the left area and ensure the {{if UI == "MVC"}}`ModularCrm`{{else if UI == "BlazorWebApp"}}`ModularCrm` and `ModularCrm.Client`{{end}} package{{if UI == "BlazorWebApp"}}s were{{else}} was{{end}} checked in the middle area as shown in the preceding figure. Finally, click _OK_. ## Summary diff --git a/docs/en/tutorials/modular-crm/part-05.md b/docs/en/tutorials/modular-crm/part-05.md index e85a3b9597..16d40cdb8c 100644 --- a/docs/en/tutorials/modular-crm/part-05.md +++ b/docs/en/tutorials/modular-crm/part-05.md @@ -364,6 +364,32 @@ Configure(options => This will tell the ABP framework to create API controllers for the application services in the `ModularCrm.Ordering` assembly. +{{if UI == "BlazorWebApp"}} + +### Configuring Client Proxies for the Ordering Module + +In the `ModularCrm.Client` project, configure HTTP client proxies for the Ordering contracts in the `ModularCrmClientModule` class: + +````csharp +using ModularCrm.Ordering; + +[DependsOn( + typeof(OrderingContractsModule) + // ...other dependencies +)] +public class ModularCrmClientModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + context.Services.AddHttpClientProxies(typeof(OrderingContractsModule).Assembly); + } +} +```` + +Also ensure the `ModularCrm.Ordering.Blazor` package is installed for both the `ModularCrm` and `ModularCrm.Client` projects. + +{{end}} + ### Creating Example Orders This section will create a few example orders using the [Swagger UI](../../framework/api-development/swagger.md). Thus, you will have some sample orders to show on the UI.