diff --git a/docs/en/tutorials/modular-crm/images/vscode-catalog-index-razor-blazor-webapp.png b/docs/en/tutorials/modular-crm/images/vscode-catalog-index-razor-blazor-webapp.png new file mode 100644 index 0000000000..00ae4a7b8c Binary files /dev/null and b/docs/en/tutorials/modular-crm/images/vscode-catalog-index-razor-blazor-webapp.png differ diff --git a/docs/en/tutorials/modular-crm/part-03.md b/docs/en/tutorials/modular-crm/part-03.md index 66442455d3..34d2ee6b55 100644 --- a/docs/en/tutorials/modular-crm/part-03.md +++ b/docs/en/tutorials/modular-crm/part-03.md @@ -355,6 +355,8 @@ public partial class ProductToProductDtoMapper : MapperBase ### Exposing Application Services as HTTP API Controllers +{{if UI == "MVC"}} + > This application doesn't need to expose any functionality as HTTP API, because all the module integration and communication will be done in the same process as a natural aspect of a monolith modular application. However, in this section, we will create HTTP APIs because; > > 1. We will use these HTTP API endpoints in development to create some example data. @@ -362,6 +364,8 @@ public partial class ProductToProductDtoMapper : MapperBase > > So, follow the instructions in this section and expose the product application service as an HTTP API endpoint. +{{end}} + To create HTTP API endpoints for the catalog module, you have two options: * You can create a regular ASP.NET Core Controller class in the `ModularCrm.Catalog` project, inject `IProductAppService` and create wrapper methods for each public method of the product application service. You will do this later while you create the Ordering module. (Also, you can check the `SampleController` class under the **Samples** folder in the `ModularCrm.Catalog` project for an example) @@ -400,7 +404,9 @@ public class ModularCrmClientModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - context.Services.AddHttpClientProxies(typeof(CatalogContractsModule).Assembly); + ... + context.Services.AddHttpClientProxies(typeof(ModularCrmContractsModule).Assembly); + context.Services.AddHttpClientProxies(typeof(CatalogContractsModule).Assembly); // NEW: ADD HttpClientProxies } } ```` @@ -503,7 +509,7 @@ Here, you simply use the `IProductAppService` to get a list of all products and {{else if UI == "BlazorWebApp"}} Open the `ModularCrm.Catalog` .NET solution in your IDE, and find the `Pages/Catalog/Index.razor` file under the `ModularCrm.Catalog.Blazor` project. -> Blazor WebApp placeholder screenshot file: `images/vscode-catalog-index-razor-blazor-webapp.png` +![vscode-catalog-index-razor-blazor-webapp](images/vscode-catalog-index-razor-blazor-webapp.png) Replace the `Index.razor` file with the following content: