Browse Source

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.
pull/24987/head
SALİH ÖZKARA 1 month ago
parent
commit
56e8f09b51
  1. 2
      docs/en/tutorials/modular-crm/part-02.md
  2. 26
      docs/en/tutorials/modular-crm/part-03.md
  3. 2
      docs/en/tutorials/modular-crm/part-04.md
  4. 26
      docs/en/tutorials/modular-crm/part-05.md

2
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

26
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.

2
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

26
docs/en/tutorials/modular-crm/part-05.md

@ -364,6 +364,32 @@ Configure<AbpAspNetCoreMvcOptions>(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.

Loading…
Cancel
Save