Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes & enhancements for BookStore Tutorial #20407

Merged
merged 9 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/en/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
ABP CLI (Command Line Interface) is a command line tool to perform some common operations for ABP based solutions or ABP Studio features.

> 🛈 With **v8.2+**, the old/legacy ABP CLI has been replaced with a new CLI system to align with the new templating system and [ABP Studio](../studio/index.md). The new ABP CLI commands are explained in this documentation. However, if you want to learn more about the differences between the old and new CLIs, want to learn the reason for the change, or need guidance to use the old ABP CLI, please refer to the [Old vs New CLI](differences-between-old-and-new-cli.md) documentation.
>
> You may need to remove the Old CLI before installing the New CLI, by running the following command: `dotnet tool uninstall -g Volo.Abp.Cli`

## Installation

Expand Down
5 changes: 4 additions & 1 deletion docs/en/docs-nav.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@
},
{
"text": "Book Store application",
"path": "tutorials/book-store/index.md",
"items": [
{
"text": "Overview",
"path": "tutorials/book-store/overview.md"
},
{
"text": "1: Creating the server side",
"path": "tutorials/book-store/part-01.md"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,21 @@ This tutorial is organized as the following parts:
- [Part 8: Authors: Application Layer](part-08.md)
- [Part 9: Authors: User Interface](part-09.md)
- [Part 10: Book to Author Relation](part-10.md)

### Download the Source Code

This tutorial has multiple versions based on your **UI** and **Database** preferences. We've prepared a few combinations of the source code to be downloaded:

* [MVC (Razor Pages) UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
* [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
* [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)

> If you encounter the "filename too long" or "unzip" error on Windows, please see [this guide](../../kb/windows-path-too-long-fix.md).

{{if UI == "MVC" && DB == "EF"}}

### Video Tutorial

This part is also recorded as a video tutorial and **<a href="https://www.youtube.com/watch?v=cJzyIFfAlp8&list=PLsNclT2aHJcPNaCf7Io3DbMN6yAk_DgWJ&index=1" target="_blank">published on YouTube</a>**.

{{end}}
42 changes: 1 addition & 41 deletions docs/en/tutorials/book-store/part-01.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,6 @@
}
````

## About This Tutorial

In this tutorial series, you will build an ABP based web application named `Acme.BookStore`. This application is used to manage a list of books and their authors. It is developed using the following technologies:

* **{{DB_Value}}** as the database provider.
* **{{UI_Value}}** as the UI Framework.

This tutorial is organized as the following parts:

- **Part 1: Creating the server side (this part)**
- [Part 2: The book list page](part-02.md)
- [Part 3: Creating, updating and deleting books](part-03.md)
- [Part 4: Integration tests](part-04.md)
- [Part 5: Authorization](part-05.md)
- [Part 6: Authors: Domain layer](part-06.md)
- [Part 7: Authors: Database Integration](part-07.md)
- [Part 8: Authors: Application Layer](part-08.md)
- [Part 9: Authors: User Interface](part-09.md)
- [Part 10: Book to Author Relation](part-10.md)

### Download the Source Code

This tutorial has multiple versions based on your **UI** and **Database** preferences. We've prepared a few combinations of the source code to be downloaded:

* [MVC (Razor Pages) UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
* [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
* [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)

> If you encounter the "filename too long" or "unzip" error on Windows, please see [this guide](../../kb/windows-path-too-long-fix.md).

> After downloading the source code, you might need to run some commands before running the application. See the _After Creating the Solution_ section below for more information.

{{if UI == "MVC" && DB == "EF"}}

### Video Tutorial

This part is also recorded as a video tutorial and **<a href="https://www.youtube.com/watch?v=cJzyIFfAlp8&list=PLsNclT2aHJcPNaCf7Io3DbMN6yAk_DgWJ&index=1" target="_blank">published on YouTube</a>**.

{{end}}

## Creating the Solution

Before starting the development, create a new solution named `Acme.BookStore` and run it by following the [getting started tutorial](../../get-started/layered-web-application.md).
Expand Down Expand Up @@ -480,7 +440,7 @@ ABP can [**automagically**](../../framework/api-development/auto-controllers.md)

### Swagger UI

The startup template is configured to run the [Swagger UI](https://swagger.io/tools/swagger-ui/) using the [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) library. Run the application ({{if UI=="MVC"}}`Acme.BookStore.Web`{{else}}`Acme.BookStore.HttpApi.Host`{{end}}) by pressing `CTRL+F5` and navigate to `https://localhost:<port>/swagger/` on your browser. Replace `<port>` with your own port number.
The startup template is configured to run the [Swagger UI](https://swagger.io/tools/swagger-ui/) using the [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) library. Run the application ({{if UI=="MVC"}}`Acme.BookStore.Web`{{else if UI=="BlazorServer"}}`Acme.BookStore.Blazor`{{else}}`Acme.BookStore.HttpApi.Host`{{end}}) by pressing `CTRL+F5` and navigate to `https://localhost:<port>/swagger/` on your browser. Replace `<port>` with your own port number.

You will see some built-in service endpoints as well as the `Book` service and its REST-style endpoints:

Expand Down
46 changes: 6 additions & 40 deletions docs/en/tutorials/book-store/part-02.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,6 @@
}
````

## About This Tutorial

In this tutorial series, you will build an ABP based web application named `Acme.BookStore`. This application is used to manage a list of books and their authors. It is developed using the following technologies:

* **{{DB_Value}}** as the ORM provider.
* **{{UI_Value}}** as the UI Framework.

This tutorial is organized as the following parts:

- [Part 1: Creating the server side](part-01.md)
- **Part 2: The book list page (this part)**
- [Part 3: Creating, updating and deleting books](part-03.md)
- [Part 4: Integration tests](part-04.md)
- [Part 5: Authorization](part-05.md)
- [Part 6: Authors: Domain layer](part-06.md)
- [Part 7: Authors: Database Integration](part-07.md)
- [Part 8: Authors: Application Layer](part-08.md)
- [Part 9: Authors: User Interface](part-09.md)
- [Part 10: Book to Author Relation](part-10.md)

### Download the Source Code

This tutorial has multiple versions based on your **UI** and **Database** preferences. We've prepared a few combinations of the source code to be downloaded:

* [MVC (Razor Pages) UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
* [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
* [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)

> If you encounter the "filename too long" or "unzip" error on Windows, please see [this guide](../../kb/windows-path-too-long-fix.md).

{{if UI == "MVC" && DB == "EF"}}

### Video Tutorial

This part is also recorded as a video tutorial and **<a href="https://www.youtube.com/watch?v=UDNlLiPiBiw&list=PLsNclT2aHJcPNaCf7Io3DbMN6yAk_DgWJ&index=2" target="_blank">published on YouTube</a>**.

{{end}}

{{if UI == "MVC"}}

## Dynamic JavaScript Proxies
Expand Down Expand Up @@ -556,9 +518,13 @@ Now you can see the final result on your browser:

## Create a Books Page

It's time to create something visible and usable! Right click on the `Pages` folder under the `Acme.BookStore.Blazor.Client` project and add a new **razor component**, named `Books.razor`:
It's time to create something visible and usable! Right click on the `Pages` folder under the {{ if UI == "Blazor"}}`Acme.BookStore.Blazor.Client`{{ else }}`Acme.BookStore.Blazor`{{ end }} project and add a new **razor component**, named `Books.razor`:

{{ if UI == "Blazor"}}
![blazor-add-books-component](images/blazor-add-books-component-client.png)
{{ else }}
![blazor-add-books-component](images/blazor-add-books-component.png)
{{ end }}

Replace the contents of this component as shown below:

Expand All @@ -574,7 +540,7 @@ Replace the contents of this component as shown below:

### Add the Books Page to the Main Menu

Open the `BookStoreMenuContributor` class in the `Blazor.Client` project add the following code to the end of the `ConfigureMainMenuAsync` method:
Open the `BookStoreMenuContributor` class in the {{ if UI == "Blazor"}}`Acme.BookStore.Blazor.Client`{{ else }}`Acme.BookStore.Blazor`{{ end }} project add the following code to the end of the `ConfigureMainMenuAsync` method:

````csharp
context.Menu.AddItem(
Expand Down
38 changes: 0 additions & 38 deletions docs/en/tutorials/book-store/part-03.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,6 @@
}
````

## About This Tutorial

In this tutorial series, you will build an ABP based web application named `Acme.BookStore`. This application is used to manage a list of books and their authors. It is developed using the following technologies:

* **{{DB_Value}}** as the ORM provider.
* **{{UI_Value}}** as the UI Framework.

This tutorial is organized as the following parts:

- [Part 1: Creating the server side](part-01.md)
- [Part 2: The book list page](part-02.md)
- **Part 3: Creating, updating and deleting books (this part)**
- [Part 4: Integration tests](part-04.md)
- [Part 5: Authorization](part-05.md)
- [Part 6: Authors: Domain layer](part-06.md)
- [Part 7: Authors: Database Integration](part-07.md)
- [Part 8: Authors: Application Layer](part-08.md)
- [Part 9: Authors: User Interface](part-09.md)
- [Part 10: Book to Author Relation](part-10.md)

### Download the Source Code

This tutorial has multiple versions based on your **UI** and **Database** preferences. We've prepared a few combinations of the source code to be downloaded:

* [MVC (Razor Pages) UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
* [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
* [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)

> If you encounter the "filename too long" or "unzip" error on Windows, please see [this guide](../../kb/windows-path-too-long-fix.md).

{{if UI == "MVC" && DB == "EF"}}

### Video Tutorial

This part is also recorded as a video tutorial and **<a href="https://www.youtube.com/watch?v=TLShZO8u2VE&list=PLsNclT2aHJcPNaCf7Io3DbMN6yAk_DgWJ&index=3" target="_blank">published on YouTube</a>**.

{{end}}

{{if UI == "MVC"}}

## Creating a New Book
Expand Down
38 changes: 0 additions & 38 deletions docs/en/tutorials/book-store/part-04.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,6 @@
}
````

## About This Tutorial

In this tutorial series, you will build an ABP based web application named `Acme.BookStore`. This application is used to manage a list of books and their authors. It is developed using the following technologies:

* **{{DB_Value}}** as the ORM provider.
* **{{UI_Value}}** as the UI Framework.

This tutorial is organized as the following parts;

- [Part 1: Creating the server side](part-01.md)
- [Part 2: The book list page](part-02.md)
- [Part 3: Creating, updating and deleting books](part-03.md)
- **Part 4: Integration tests (this part)**
- [Part 5: Authorization](part-05.md)
- [Part 6: Authors: Domain layer](part-06.md)
- [Part 7: Authors: Database Integration](part-07.md)
- [Part 8: Authors: Application Layer](part-08.md)
- [Part 9: Authors: User Interface](part-09.md)
- [Part 10: Book to Author Relation](part-10.md)

### Download the Source Code

This tutorial has multiple versions based on your **UI** and **Database** preferences. We've prepared a few combinations of the source code to be downloaded:

* [MVC (Razor Pages) UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
* [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
* [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)

> If you encounter the "filename too long" or "unzip" error on Windows, please see [this guide](../../kb/windows-path-too-long-fix.md).

{{if UI == "MVC" && DB == "EF"}}

### Video Tutorial

This part is also recorded as a video tutorial and **<a href="https://www.youtube.com/watch?v=aidRB4YFDLM&list=PLsNclT2aHJcPNaCf7Io3DbMN6yAk_DgWJ&index=4" target="_blank">published on YouTube</a>**.

{{end}}

## Test Projects in the Solution

This part covers the **server side** tests. There are several test projects in the solution:
Expand Down
38 changes: 0 additions & 38 deletions docs/en/tutorials/book-store/part-05.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,6 @@
}
````

## About This Tutorial

In this tutorial series, you will build an ABP based web application named `Acme.BookStore`. This application is used to manage a list of books and their authors. It is developed using the following technologies:

* **{{DB_Value}}** as the ORM provider.
* **{{UI_Value}}** as the UI Framework.

This tutorial is organized as the following parts;

- [Part 1: Creating the server side](part-01.md)
- [Part 2: The book list page](part-02.md)
- [Part 3: Creating, updating and deleting books](part-03.md)
- [Part 4: Integration tests](part-04.md)
- **Part 5: Authorization (this part)**
- [Part 6: Authors: Domain layer](part-06.md)
- [Part 7: Authors: Database Integration](part-07.md)
- [Part 8: Authors: Application Layer](part-08.md)
- [Part 9: Authors: User Interface](part-09.md)
- [Part 10: Book to Author Relation](part-10.md)

### Download the Source Code

This tutorial has multiple versions based on your **UI** and **Database** preferences. We've prepared a few combinations of the source code to be downloaded:

* [MVC (Razor Pages) UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
* [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
* [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)

> If you encounter the "filename too long" or "unzip" error on Windows, please see [this guide](../../kb/windows-path-too-long-fix.md).

{{if UI == "MVC" && DB == "EF"}}

### Video Tutorial

This part is also recorded as a video tutorial and **<a href="https://www.youtube.com/watch?v=1WsfMITN_Jk&list=PLsNclT2aHJcPNaCf7Io3DbMN6yAk_DgWJ&index=5" target="_blank">published on YouTube</a>**.

{{end}}

## Permissions

ABP provides an [authorization system](../../framework/fundamentals/authorization.md) based on the ASP.NET Core's [authorization infrastructure](https://docs.microsoft.com/en-us/aspnet/core/security/authorization/introduction). One major feature added on top of the standard authorization infrastructure is the **permission system** which allows to define permissions and enable/disable per role, user or client.
Expand Down
30 changes: 0 additions & 30 deletions docs/en/tutorials/book-store/part-06.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,6 @@
}
````

## About This Tutorial

In this tutorial series, you will build an ABP based web application named `Acme.BookStore`. This application is used to manage a list of books and their authors. It is developed using the following technologies:

* **{{DB_Value}}** as the ORM provider.
* **{{UI_Value}}** as the UI Framework.

This tutorial is organized as the following parts;

- [Part 1: Creating the server side](part-01.md)
- [Part 2: The book list page](part-02.md)
- [Part 3: Creating, updating and deleting books](part-03.md)
- [Part 4: Integration tests](part-04.md)
- [Part 5: Authorization](part-05.md)
- **Part 6: Authors: Domain layer (this part)**
- [Part 7: Authors: Database Integration](part-07.md)
- [Part 8: Authors: Application Layer](part-08.md)
- [Part 9: Authors: User Interface](part-09.md)
- [Part 10: Book to Author Relation](part-10.md)

### Download the Source Code

This tutorial has multiple versions based on your **UI** and **Database** preferences. We've prepared a few combinations of the source code to be downloaded:

* [MVC (Razor Pages) UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
* [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
* [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)

> If you encounter the "filename too long" or "unzip" error on Windows, please see [this guide](../../kb/windows-path-too-long-fix.md).

## Introduction

In the previous parts, we've used the ABP infrastructure to easily build some services;
Expand Down
30 changes: 0 additions & 30 deletions docs/en/tutorials/book-store/part-07.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,6 @@
}
````

## About This Tutorial

In this tutorial series, you will build an ABP based web application named `Acme.BookStore`. This application is used to manage a list of books and their authors. It is developed using the following technologies:

* **{{DB_Value}}** as the ORM provider.
* **{{UI_Value}}** as the UI Framework.

This tutorial is organized as the following parts;

- [Part 1: Creating the server side](part-01.md)
- [Part 2: The book list page](part-02.md)
- [Part 3: Creating, updating and deleting books](part-03.md)
- [Part 4: Integration tests](part-04.md)
- [Part 5: Authorization](part-05.md)
- [Part 6: Authors: Domain layer](part-06.md)
- **Part 7: Authors: Database Integration (this part)**
- [Part 8: Authors: Application Layer](part-08.md)
- [Part 9: Authors: User Interface](part-09.md)
- [Part 10: Book to Author Relation](part-10.md)

### Download the Source Code

This tutorial has multiple versions based on your **UI** and **Database** preferences. We've prepared a few combinations of the source code to be downloaded:

* [MVC (Razor Pages) UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Mvc-EfCore)
* [Blazor UI with EF Core](https://github.com/abpframework/abp-samples/tree/master/BookStore-Blazor-EfCore)
* [Angular UI with MongoDB](https://github.com/abpframework/abp-samples/tree/master/BookStore-Angular-MongoDb)

> If you encounter the "filename too long" or "unzip" error on Windows, please see [this guide](../../kb/windows-path-too-long-fix.md).

## Introduction

This part explains how to configure the database integration for the `Author` entity introduced in the previous part.
Expand Down
Loading