From b329520312b8771b7c08d69870e8160ce6e98723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Sun, 5 Jul 2020 21:38:04 +0300 Subject: [PATCH] Fix db provider naming --- docs/en/Tutorials/Part-1.md | 27 +++++++++++++++------------ docs/en/Tutorials/Part-2.md | 15 +++++++++------ docs/en/Tutorials/Part-3.md | 16 +++++++++------- docs/en/Tutorials/Part-4.md | 22 ++++++++++++---------- docs/en/Tutorials/Part-5.md | 18 ++++++++++-------- 5 files changed, 55 insertions(+), 43 deletions(-) diff --git a/docs/en/Tutorials/Part-1.md b/docs/en/Tutorials/Part-1.md index c74f7d8c85..89236e2a85 100644 --- a/docs/en/Tutorials/Part-1.md +++ b/docs/en/Tutorials/Part-1.md @@ -2,22 +2,25 @@ ````json //[doc-params] { - "UI": ["MVC","NG"] + "UI": ["MVC","NG"], + "DB": ["EF","Mongo"] } ```` {{ if UI == "MVC" - DB="ef" - DB_Text="Entity Framework Core" UI_Text="mvc" else if UI == "NG" - DB="mongodb" - DB_Text="MongoDB" UI_Text="angular" else - DB ="?" UI_Text="?" end +if DB == "EF" + DB_Text="Entity Framework Core" +else if DB == "Mongo" + DB_Text="MongoDB" +else + DB_Text="?" +end }} ## About This Tutorial @@ -41,7 +44,7 @@ You can find the completed solution on {{if UI == "MVC"}}[the GitHub repository] ## Creating the Solution -Before starting to the development, create a new solution named `Acme.BookStore` and run it by following the [getting started tutorial](../Getting-Started-{{if UI == 'NG'}}Angular{{else}}AspNetCore-MVC{{end}}-Template#creating-a-new-project). +Before starting to the development, create a new solution named `Acme.BookStore` and run it by following the [getting started tutorial](../Getting-Started.md). ## Create the Book Entity @@ -107,7 +110,7 @@ The final folder/file structure should be as shown below: ### Add Book Entity to the DbContext -{{if DB == "ef"}} +{{if DB == "EF"}} EF Core requires to relate entities with your `DbContext`. The easiest way to do this is to add a `DbSet` property to the `BookStoreDbContext` class in the `Acme.BookStore.EntityFrameworkCore` project, as shown below: @@ -121,7 +124,7 @@ public class BookStoreDbContext : AbpDbContext {{end}} -{{if DB == "mongodb"}} +{{if DB == "Mongo"}} Add a `IMongoCollection Books` property to the `BookStoreMongoDbContext` inside the `Acme.BookStore.MongoDB` project: @@ -135,7 +138,7 @@ public class BookStoreMongoDbContext : AbpMongoDbContext {{end}} -{{if DB == "ef"}} +{{if DB == "EF"}} ### Map the Book Entity to a Database Table @@ -261,13 +264,13 @@ Run the `Acme.BookStore.DbMigrator` application to update the database: ![bookstore-dbmigrator-on-solution](images/bookstore-dbmigrator-on-solution.png) -{{if DB == "ef"}} +{{if DB == "EF"}} `.DbMigrator` is a console application that can be run to **migrate the database schema** and **seed the data** on **development** and **production** environments. {{end}} -{{if DB == "mongodb"}} +{{if DB == "Mongo"}} While MongoDB **doesn't require** a database schema migration, it is still good to run this application since it **seeds the initial data** on the database. This application can be used on **development** and **production** environments. diff --git a/docs/en/Tutorials/Part-2.md b/docs/en/Tutorials/Part-2.md index 1a3c2db7fd..904d68aa7f 100644 --- a/docs/en/Tutorials/Part-2.md +++ b/docs/en/Tutorials/Part-2.md @@ -2,22 +2,25 @@ ````json //[doc-params] { - "UI": ["MVC","NG"] + "UI": ["MVC","NG"], + "DB": ["EF","Mongo"] } ```` {{ if UI == "MVC" - DB="ef" - DB_Text="Entity Framework Core" UI_Text="mvc" else if UI == "NG" - DB="mongodb" - DB_Text="MongoDB" UI_Text="angular" else - DB ="?" UI_Text="?" end +if DB == "EF" + DB_Text="Entity Framework Core" +else if DB == "Mongo" + DB_Text="MongoDB" +else + DB_Text="?" +end }} ## About This Tutorial diff --git a/docs/en/Tutorials/Part-3.md b/docs/en/Tutorials/Part-3.md index 1a861f76bd..c19f621ecf 100644 --- a/docs/en/Tutorials/Part-3.md +++ b/docs/en/Tutorials/Part-3.md @@ -2,23 +2,25 @@ ````json //[doc-params] { - "UI": ["MVC","NG"] + "UI": ["MVC","NG"], + "DB": ["EF","Mongo"] } ```` - {{ if UI == "MVC" - DB="ef" - DB_Text="Entity Framework Core" UI_Text="mvc" else if UI == "NG" - DB="mongodb" - DB_Text="MongoDB" UI_Text="angular" else - DB ="?" UI_Text="?" end +if DB == "EF" + DB_Text="Entity Framework Core" +else if DB == "Mongo" + DB_Text="MongoDB" +else + DB_Text="?" +end }} ## About This Tutorial diff --git a/docs/en/Tutorials/Part-4.md b/docs/en/Tutorials/Part-4.md index c2c0c2b530..98900abff8 100644 --- a/docs/en/Tutorials/Part-4.md +++ b/docs/en/Tutorials/Part-4.md @@ -2,23 +2,25 @@ ````json //[doc-params] { - "UI": ["MVC","NG"] + "UI": ["MVC","NG"], + "DB": ["EF","Mongo"] } ```` - {{ if UI == "MVC" - DB="ef" - DB_Text="Entity Framework Core" UI_Text="mvc" else if UI == "NG" - DB="mongodb" - DB_Text="MongoDB" UI_Text="angular" -else - DB ="?" +else UI_Text="?" end +if DB == "EF" + DB_Text="Entity Framework Core" +else if DB == "Mongo" + DB_Text="MongoDB" +else + DB_Text="?" +end }} ## About This Tutorial @@ -52,11 +54,11 @@ Each project is used to test the related project. Test projects use the followin * [Shoudly](http://shouldly.readthedocs.io/en/latest/) as the assertion library. * [NSubstitute](http://nsubstitute.github.io/) as the mocking library. -{{if DB="ef"}} +{{if DB="EF"}} > The test projects are configured to use **SQLite in-memory** as the database. A separate database instance is created and seeded (with the data seed system) to prepare a fresh database for every test. -{{else if DB="mongodb"}} +{{else if DB="Mongo"}} > **[Mongo2Go](https://github.com/Mongo2Go/Mongo2Go)** library is used to mock the MongoDB database. A separate database instance is created and seeded (with the data seed system) to prepare a fresh database for every test. diff --git a/docs/en/Tutorials/Part-5.md b/docs/en/Tutorials/Part-5.md index 17dacbd4f7..fcf359d974 100644 --- a/docs/en/Tutorials/Part-5.md +++ b/docs/en/Tutorials/Part-5.md @@ -2,23 +2,25 @@ ````json //[doc-params] { - "UI": ["MVC","NG"] + "UI": ["MVC","NG"], + "DB": ["EF","Mongo"] } ```` - {{ if UI == "MVC" - DB="ef" - DB_Text="Entity Framework Core" UI_Text="mvc" else if UI == "NG" - DB="mongodb" - DB_Text="MongoDB" UI_Text="angular" -else - DB ="?" +else UI_Text="?" end +if DB == "EF" + DB_Text="Entity Framework Core" +else if DB == "Mongo" + DB_Text="MongoDB" +else + DB_Text="?" +end }} ## About This Tutorial