Browse Source

Completed the part 2

pull/21456/head
Halil İbrahim Kalkan 2 years ago
parent
commit
b42f1323fc
  1. BIN
      docs/en/tutorials/microservice/images/abp-studio-browse-catalog-service.png
  2. BIN
      docs/en/tutorials/microservice/images/abp-studio-browser-catalog-service-swagger-ui.png
  3. BIN
      docs/en/tutorials/microservice/images/abp-studio-new-catalog-service-in-solution-explorer.png
  4. BIN
      docs/en/tutorials/microservice/images/abp-studio-open-with-visual-studio.png
  5. BIN
      docs/en/tutorials/microservice/images/abp-studio-solution-runner-play-all.png
  6. BIN
      docs/en/tutorials/microservice/images/sql-server-management-studio-databases.png
  7. BIN
      docs/en/tutorials/microservice/images/sql-server-management-studio-login-screen.png
  8. BIN
      docs/en/tutorials/microservice/images/visual-studio-solution-explorer-catalog-service.png
  9. 60
      docs/en/tutorials/microservice/part-02.md

BIN
docs/en/tutorials/microservice/images/abp-studio-browse-catalog-service.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
docs/en/tutorials/microservice/images/abp-studio-browser-catalog-service-swagger-ui.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

BIN
docs/en/tutorials/microservice/images/abp-studio-new-catalog-service-in-solution-explorer.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

BIN
docs/en/tutorials/microservice/images/abp-studio-open-with-visual-studio.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
docs/en/tutorials/microservice/images/abp-studio-solution-runner-play-all.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
docs/en/tutorials/microservice/images/sql-server-management-studio-databases.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
docs/en/tutorials/microservice/images/sql-server-management-studio-login-screen.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
docs/en/tutorials/microservice/images/visual-studio-solution-explorer-catalog-service.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

60
docs/en/tutorials/microservice/part-02.md

@ -16,7 +16,7 @@
In this tutorial, you will create a new Catalog service and integrate it to the solution.
## Creating the Service
## Creating the Catalog Service
Right-click the `services` folder in the *Solution Explorer* panel, select the *Add* -> *New Module* -> *Microservice* command:
@ -48,16 +48,66 @@ ABP Studio intelligently selects the right values for you, but you should still
That's all, ABP Studio creates the new microservice and arranges all the integration and configuration for you.
## Exploring the New Microservice
## Exploring the New Catalog Microservice
The new microservice is added under the `services` folder in the `CloudCrm` solution:
In this section, we will investigate the new microservice in overall.
### Understanding the Packages of The Service
The new microservice is added under the `services` folder in the `CloudCrm` ABP Studio solution:
![abp-studio-new-catalog-service-in-solution-explorer](images/abp-studio-new-catalog-service-in-solution-explorer.png)
The new microservice has its own separate .NET solution that includes three .NET projects:
The new microservice has its own separate .NET solution that includes three packages (.NET projects):
* `CloudCrm.Catalog` is the main project that you will implement your service. It typically contains your [entities](../../framework/architecture/domain-driven-design/entities.md), [repositories](../../framework/architecture/domain-driven-design/repositories.md), [application services](../../framework/architecture/domain-driven-design/application-services.md), API controllers, etc.
* `CloudCrm.Catalog.Contracts` project can be shared with the other services and applications. It typically contains interfaces of your [application services](../../framework/architecture/domain-driven-design/application-services.md), [data transfer objects](../../framework/architecture/domain-driven-design/data-transfer-objects.md), and some other types you may want to share with the clients of this microservice.
* `CloudCrm.Catalog.Tests` is for building your unit and integration tests for this microservice.
f
### Opening the Service in an IDE
You can open the new microservice in your favorite IDE for development. As a shortcut, you can right-click it in ABP Studio, select the *Open with* -> *Visual Studio* command for example:
![abp-studio-open-with-visual-studio](images/abp-studio-open-with-visual-studio.png)
Here is the `CloudCrm.Catalog` .NET solution in Visual Studio:
![visual-studio-solution-explorer-catalog-service](images/visual-studio-solution-explorer-catalog-service.png)
### Running the New Service
You can run the solution using ABP Studio's *Solution Runner*. It will also run the new Catalog service as a part of the solution.
> Before running the solution, **ensure that all the applications are built**. If you are not sure, right-click the root item (`CloudCrm`) in the *Solution Explorer* panel and select the *Build* -> *Graph Build* command.
Click the *Play* button near to the solution root:
![abp-studio-solution-runner-play-all](D:\Github\abp\docs\en\tutorials\microservice\images\abp-studio-solution-runner-play-all.png)
### Browsing the Catalog Service
Once all of the applications has started, right-click the Catalog service and select the *Browse* command:
![abp-studio-browse-catalog-service](images/abp-studio-browse-catalog-service.png)
It will open the built-in browser and you will see the Swagger UI for the Catalog service:
![abp-studio-browser-catalog-service-swagger-ui](images/abp-studio-browser-catalog-service-swagger-ui.png)
### Opening the Catalog Database
The new Catalog microservice has its own database. Assuming you've selected SQL Server as your DBMS, you can open the SQL Server Management Studio to see its database:
![sql-server-management-studio-login-screen](images/sql-server-management-studio-login-screen.png)
Use `localhost,1434` as the *Server name*, select the *SQL Server Authentication* as the *Authentication* type, use `sa` as the *Login* name and `myPassw@rd` as the *Password* value. You can find these values in the `appsettings.json` file in the `CloudCrm.Catalog` project of the .NET solution of the Catalog microservice.
Once you click the *Connect* button, you can see all the databases and explore their data:
![sql-server-management-studio-databases](images/sql-server-management-studio-databases.png)
The Catalog service's database has only three initial table. The first one is for Entity Framework Core's migration system, and the others are for ABP's [distributed event bus](../../solution-templates/microservice/distributed-events.md) to properly apply transactional events using the outbox and inbox patterns.
## Summary
In this part of the Microservice Development Tutorial, we added a new Catalog microservice to the solution, explored its code structure and database, and browse its APIs using the Swagger UI. In the next part, we will create functionality in that new microservice.
Loading…
Cancel
Save