From b8357f7106e6fc17ecc4766de2ebd3fbc869757c Mon Sep 17 00:00:00 2001 From: Engincan VESKE Date: Tue, 4 Mar 2025 09:43:14 +0300 Subject: [PATCH] Update microservice-mongodb.md --- docs/en/guides/microservice-mongodb.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/en/guides/microservice-mongodb.md b/docs/en/guides/microservice-mongodb.md index c9b63ecf4e..f857370d09 100644 --- a/docs/en/guides/microservice-mongodb.md +++ b/docs/en/guides/microservice-mongodb.md @@ -1,12 +1,12 @@ # Change Microservice project to use MongoDB Provider -This guide explains how to change Microservice project to use MongoDB as the database provider. +This guide explains how to change the Microservice project to use MongoDB as the database provider. ## Create a new Microservice project -Use the ABP Suite to create a new Microservice project, in this guide we use `BookStore` as project name. +> You can use [ABP Studio](../studio/index.md) to create a new Microservice project. In this guide, we assume that you have already created a microservice solution and used `BookStore` as your project name. -You will get the solution as shown below: +Currently, your microservice solution should be similar to that in the figure below: ![microservce-mongodb-project](../images/microservice-mongodb.png) @@ -16,9 +16,9 @@ You need to replace all EF Core references with MongoDB and update module depend Example: -* Remove `Volo.Abp.EntityFrameworkCore.SqlServer` Nuget package reference. -* Remove `Microsoft.EntityFrameworkCore.Tools` Nuget package reference -* Remove `AbpEntityFrameworkCoreSqlServerModule` depend. +* Remove `Volo.Abp.EntityFrameworkCore.SqlServer` NuGet package reference. (instead use `Volo.Abp.MongoDB` NuGet package and also add the relevant depends on statement) +* Remove `Microsoft.EntityFrameworkCore.Tools` NuGet package reference. +* Remove `AbpEntityFrameworkCoreSqlServerModule` dependency. * Replace `Volo.Abp.PermissionManagement.EntityFrameworkCore` with `Volo.Abp.PermissionManagement.MongoDB`. * Update `AbpPermissionManagementEntityFrameworkCoreModule` to `AbpPermissionManagementMongoDbModule`. @@ -43,9 +43,9 @@ Here we use `BookStore.ProductService` project as an example: protected override void CreateModel(IMongoModelBuilder modelBuilder) { modelBuilder.Entity(b => - { - b.CollectionName = ProductServiceDbProperties.DbTablePrefix + "Products"; - }); + { + b.CollectionName = ProductServiceDbProperties.DbTablePrefix + "Products"; + }); } } ```