body:This PR generated automatically to merge dev with prerel-9.1. Please review the changed files before merging to prevent any errors that may occur.
branch:auto-merge/rel-9-1/${{github.run_number}}
title:Merge branch dev with rel-9.1
body:This PR generated automatically to merge dev with rel-9.1. Please review the changed files before merging to prevent any errors that may occur.
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:
* **Entity Framework Core** as the database provider.
* **MVC** as the UI Framework.
* **{{DB_Value}}** as the database provider.
* **{{UI_Value}}** as the UI Framework.
This tutorial is organized as the following parts:
We've created the initial layered monolith solution. In the next part, we will learn how to create entities, and generate CRUD pages based on the specified options (including tests, UI, customizable code support etc.) with [ABP Suite](../../suite/index.md).
@ -87,9 +95,7 @@ You can leave the other configurations as default.
> ABP Suite allows you to define properties with a great range of options, for example, you can specify the property type as *string*, *int*, *float*, *Guid*, *DateTime*, and even *File* (for file upload) and also you can set any options while defining your properties, such as specifying it as *required*, or *nullable*, setting *max-min length*, *default value* and more...
After that, you can click the **Save and Generate** button to start the code generation process:

After that, you can click the **Save and Generate** button to start the code generation process.
ABP Suite will generate the necessary code for you. It generates:
@ -104,11 +110,27 @@ ABP Suite will generate the necessary code for you. It generates:
It will take some time to complete the process. After the process is completed, you will see a success message, you can click the *Ok* button, and then run the application by clicking the *Start* button (or alternatively, directly clicking the *run* icon) in the *Solution Runner* panel:
After the application is started, you can right-click and *Browse* on the application to open it in the ABP Studio's pre-integrated browser. You can see the Books page in the following figure with a single record:


On this page, you can create a new book, update an existing book, delete a book, export all records (or the filtered records) to excel, filter the records by using the advanced filter section, bulk delete multiple records and so on.
@ -24,11 +32,11 @@ After generating the all necessary code for the `Book` entity, and testing the *
Click the entity selection box in the top right of the *CRUD page generation* page, and select the *-New entity-*:


Then, you can type `Author` for the *Name* field and leave the other options as is (you can change the menu icon as **pen** for a proper menu icon, and/or other options, if you wish). ABP Suite automatically calculates proper values for the rest of the inputs for you:


ABP Suite sets:
@ -52,13 +60,27 @@ You can leave the other configurations as default.
> **Note:** All properties are marked as **filterable** by default, and they appear in the advanced filter section because of that. You can set any properties you want as **not filterable** and then the related property will be removed from the advanced filter section and code will be generated accordingly.
You can click the **Save and Generate** button to start the code generation process:

You can click the **Save and Generate** button to start the code generation process.
ABP Suite will generate the necessary code for you. It will take some time to complete the process. After the process is completed, you will see a success message, you can click the *Ok* button, and then run the application by clicking the *Start* button (or alternatively, directly clicking the *run* icon) in the *Solution Runner* panel:
After the application is started, you can right-click and *Browse* on the application to open it in the ABP Studio's pre-integrated browser and try to add a new author:
@ -51,7 +59,23 @@ After, specifying the metadata, you can click the *Ok* button to close the modal
It will take some time to complete the process. After the process is completed, you will see a success message, you can click the *Ok* button, and then run the application by clicking the *Start* button (or alternatively, directly clicking the *run* icon) in the *Solution Runner* panel:
After the application is started, you can right-click and *Browse* on the application to open it in the ABP Studio's pre-integrated browser. You can first create an author and then create a book with the author for testing:
@ -65,15 +89,29 @@ Also, notice that, in the advanced filter section, there is an **Author** dropdo
Since you completed the bookstore application, now we can check the generated tests, and run them to see if all of them pass or not.
There are several test projects in the solution:
There are several test projects in the solution (slightly differs based on your _UI_ and _Database_ selection):
> Test projects slightly differs based on your UI and Database selection. For example, if you select MongoDB, then the `Acme.BookStore.EntityFrameworkCore.Tests` will be `Acme.BookStore.MongoDB.Tests`.
ABP Suite generated unit & integration tests, for the `Book`&`Author` entities. If you open the **Test explorer** in your IDE, you will see the following tests are generated:
ABP Suite generated tests for repository implementations & application service implementations for the generated code, if you enable *Create unit & integration tests* option, while creating the entity. Since, you already did that in the previous parts, it generated the all required tests for the entities.
@ -155,7 +193,15 @@ Since ABP Suite generated the test data seed contributors for each entity, you h
@ -28,12 +36,22 @@ On the C# side, ABP Suite adds abstract base classes for entities, application s
You can write your custom code in those classes (with the `*.Extended.cs` extension) and next time when you need to re-generate the entity, your custom code will not be overridden (only the base abstract classes will be re-generated and your changes on Suite will be respected):
> For example, you can create a new repository method like in the example above, and in the next CRUD page generation, you will ABP Suite won't override your custom code.
{{ end }}
> For example, you can create a new repository method like in the example above, and in the next CRUD page generation, ABP Suite won't override your custom code.
On the UI side, ABP Suite provides convenient comment placeholders within pages for MVC, Blazor, and Angular UIs. These comment sections serve as hook points where you can add your custom code.
{{ if UI == "MVC"}}
For example, if you open the *Books/Index.cshtml* file in your IDE, you will see those placeholders like following:
```xml
@ -50,6 +68,46 @@ For example, if you open the *Books/Index.cshtml* file in your IDE, you will see
You can write your custom codes between the _**<suite-custom-code-block-n></suite-custom-code-block-n>**_ placeholders and you can also extend these placeholders by customizing the [ABP Suite templates](../../suite/editing-templates.md).
{{ else if UI == "Angular" }}
Similar to services, there are two types of components:
- `abstract.component.ts`
- `component.ts`
The `.abstract.component.ts` file is recreated with each execution of schematics, while the code for `.component.ts` files is generated only once, so your custom changes are preserved.
When the _Customizable code_ is enabled, ABP Suite introduces custom comment placeholders in the HTML file as follows:
```html
<!--<suite-custom-code-block-0>-->
<!--</suite-custom-code-block-0>-->
```
{{ else }}
For example, if you open the *Books.razor* file in your IDE, you will see those placeholders like following:
You can write your custom codes between the _**<suite-custom-code-block-n></suite-custom-code-block-n>**_ placeholders and you can also extend these placeholders by customizing the [ABP Suite templates](../../suite/editing-templates.md).
{{ end }}
> For more information, please refer to [Customizing the Generated Code documentation](../../suite/customizing-the-generated-code.md)