Skip to content

Commit

Permalink
Merge branch 'rel-8.1' into auto-merge/rel-8-0/277
Browse files Browse the repository at this point in the history
  • Loading branch information
EngincanV authored Feb 21, 2024
2 parents 122fc6e + f683256 commit 2226a93
Show file tree
Hide file tree
Showing 27 changed files with 410 additions and 89 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/auto-pr.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

name: Merge branch rel-8.1 with rel-8.0
name: Merge branch dev with rel-8.1
on:
push:
branches:
- rel-8.0
- rel-8.1
jobs:
merge-rel-8-1-with-rel-8-0:
merge-dev-with-rel-8-1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: rel-8.1
ref: dev
- name: Reset promotion branch
run: |
git fetch origin rel-8.0:rel-8.0
git reset --hard rel-8.0
git fetch origin rel-8.1:rel-8.1
git reset --hard rel-8.1
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
branch: auto-merge/rel-8-0/${{github.run_number}}
title: Merge branch rel-8.1 with rel-8.0
body: This PR was generated automatically to merge rel-8.1 with rel-8.0. Please review the changed files before merging to prevent any errors that may occur.
branch: auto-merge/rel-8-1/${{github.run_number}}
title: Merge branch dev with rel-8.1
body: This PR was generated automatically to merge dev with rel-8.1. Please review the changed files before merging to prevent any errors that may occur.
reviewers: ${{github.actor}}
token: ${{ github.token }}
2 changes: 1 addition & 1 deletion en/abp-suite/add-solution.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ABP Suite requires an ABP solution to work on, that's why when you start it, you

Adds your existing solution which was created from the [ABP CLI](https://docs.abp.io/en/abp/latest/CLI) or [abp.io](https://abp.io/get-started) website. You have to enter your `YourProject.sln` file path. It also works if you enter the directory of the `YourProject.sln` when there's single solution inside.

![Add an existing solution](../images/suite-add-existing-solution.png)
![Add an existing solution](../images/suite-add-existing-solution-8.1.png)



Expand Down
8 changes: 4 additions & 4 deletions en/abp-suite/creating-many-to-many-relationship.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ First, we create the `Category` entity. The `Book` entity will be dependent on i

Click the **Save and generate** button and wait for ABP Suite to create the page.

![navigation-collection-category-entity](../images/navigation-collection-category-entity.png)
![navigation-collection-category-entity](../images/navigation-collection-category-entity.8.1.png)

After it finishes, run the web project and go to the **Categories** page. Click the **New Category** button and add some records:


![navigation-collection-categories-page](../images/navigation-collection-categories-page.png)
![navigation-collection-categories-page](../images/navigation-collection-categories-page.8.1.png)

#### 2- Create the "Book" entity

Expand All @@ -42,7 +42,7 @@ Click the **Navigations** tab. Then click the **Add navigation collection** butt

> Notice that almost all fields are automatically filled by convention even if you don't rename the `DTO` names, `DbSet` names in the `DbContext`, navigation property names or namespaces. This tool will automatically set all the required fields. On the other hand, these textboxes are not read-only, so that you can change them according to your requirements.
![navigation-collection-book-entity](../images/navigation-collection-book-entity.png)
![navigation-collection-book-entity](../images/navigation-collection-book-entity.8.1.png)

##### Database structure of navigation collection

Expand All @@ -54,7 +54,7 @@ Click the **Navigations** tab. Then click the **Add navigation collection** butt

The below image is the final page created by ABP Suite. The **new book** dialog has a **Categories** tab which lists all categories of the book and allows add/remove categories.

![navigation-collection-books-page](../images/navigation-collection-books-page.png)
![navigation-collection-books-page](../images/navigation-collection-books-page.8.1.png)

## What's next?

Expand Down
2 changes: 1 addition & 1 deletion en/abp-suite/editing-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ABP Suite uses templates to generate the code files. You can see the the template files by clicking "Edit Templates" menu item.

![Suite template list](../images/suite-templates.png)
![Suite template list](../images/suite-templates-8.1.png)

The are 2 template filters:

Expand Down
42 changes: 30 additions & 12 deletions en/abp-suite/generating-crud-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,26 @@ Be aware that, ABP Suite generates a unique URL for every project. After you sel

To create a new entity, make sure the *-New entity-* is selected in the **Entity** combo box which is on the top-right of the page. In this section, you need to provide the meta data of your entity. Do not use [C# reserved keywords](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/) for your entity name, plural name, database table name or the namespace.

* **Entity type**: Specifies the entity's type. (**master** or **child**)

* **Name**: Name of the entity.

* **Plural Name**: Folder names of the entity and name of `DbSet`in the `DbContext`.
* **Plural name**: Folder names of the entity and name of `DbSet`in the `DbContext`.

* **Database table/collection name**: Name of the database table for relational databases or name of the collection name for NoSQL databases.

* **Namespace**: Namespaces of the entities, DTOs and other `C#` classes.

* **Page title**: Specifies the page title for the current entity. It will be used in the page title as the localization key, so you can localize it for different languages later on.

* **Base class**: There are several base classes that comes out of the box from the ABP Framework. Basically there are 2 main types of entity. `AggregateRoot` and simple `Entity`. And these two have 2 more variants with `Audited` and `FullAudited` derivatives.

If your entity consists of child entities like an `Order` with its `OrderDetail ` entities, then you should choose [AggregateRoot](https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/AggregateRoot.cs) / [AuditedAggregateRoot](https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRoot.cs) / [FullAuditedAggregateRoot](https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedAggregateRoot.cs).

If it doesn't have any child entities like a `City` entity, you can choose [Entity](https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs) / [AuditedEntity](https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedEntity.cs) / [FullAuditedEntity](https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntity.cs)

Alternatively, you can choose [BasicAggregateRoot](https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/BasicAggregateRoot.cs) if you want to create an aggregate root without the `IHasExtraProperties` and `IHasConcurrencyStamp` interfaces implemented (extra properties & concurrency check).

* **Entity** and **AggregateRoot** are the low-level simple base classes.

* **AuditedEntity** and **AuditedAggregateRoot** adds these fields to the entity:
Expand Down Expand Up @@ -83,12 +89,13 @@ To create a new entity, make sure the *-New entity-* is selected in the **Entity

* **Excel export**: Creates a button that exports a list of all the data that were added to the entity to an Excel file.

* **Bulk delete**: Performs bulk deletion of records based on specified criteria.

* **Create unit & integration tests:** Generates unit and integrations tests for your entity.

* **Concurrency check:** Implements the `IHasConcurrencyStamp` interface of the entity. If the base class is `AggregateRoot`, concurrency control is enabled by default. For more details see the [Concurrency Check](https://docs.abp.io/en/abp/latest/Concurrency-Check) document.


![Entity info](../images/suite-entity-create-info.png)
![Entity info](../images/suite-entity-create-info-8.1.png)

## Properties

Expand All @@ -103,10 +110,11 @@ A property is a field in the entity which refers a column in the relational data
* **Regex:** Add a general expression for the property.
* **Email validation:** Choose if your property is an email and needs to be validated.
* **Required:** Defines whether a value is required or not.
* **Filterable**: Adds the property into the advanced search filters and includes it in the filters.
* **Text area:** Make the property a text area to input a text, e.g. description.
* **Nullable**: Allows you to set the property as `nullable` for the `C#` supported data types.

![Define a property](../images/suite-define-property.png)
![Define a property](../images/suite-define-property-8.1.png)

### Property list

Expand Down Expand Up @@ -149,7 +157,7 @@ Let's see how to create a navigation property for a **Book Store** project. We

Click **Save and generate** button and wait for ABP Suite to create the page.

![navigation-property-author-entity](../images/navigation-property-author-entity.png)
![navigation-property-author-entity](../images/navigation-property-author-entity-8.1.png)

After it finishes, run the web project and go to **Authors** page. Click **New Author** button and add the below 3 records:

Expand All @@ -170,7 +178,7 @@ Click the **Navigation properties** tab. Then click **Add navigation property**

> Notice that almost all fields are automatically filled by convention. If you don't rename the `DTO` names, `DbSet` names in the `DbContext`, navigation property names or namespaces, this tool will automatically set all required fields. On the other hand, these textboxes are not readonly, so that you can change them according to your requirements.
![navigation-property-book-entity](../images/navigation-property-book-entity.png)
![navigation-property-book-entity](../images/navigation-property-book-entity-8.1.png)

In the below image, you will see the mappings of the navigation property fields with the code classes.

Expand Down Expand Up @@ -211,12 +219,6 @@ The below image is the final page created by the ABP Suite. The **new book** dia

![navigation-property-books-page](../images/navigation-property-books-page.png)

#### Adding IdentityUser as navigation property

You can add `IdentityUser` entity as a navigation property to an entity by manually entering the required information. See the screenshot below:

![navigation-property-books-page](../images/navigation-property-identityuser.png)

### Saving an entity

There are 2 options to save an entity.
Expand All @@ -235,6 +237,22 @@ When you click **Save and generate** button it'll create all the related objects

![Database table for the new entity](../images/suite-database-table.png)

### Establishing/Creating Relations with Installed ABP Modules' Entities

ABP Suite allows you to establish one-to-many relationship with pre-installed ABP Modules. You can add any entity from pre-installed ABP modules as a navigation property, by checking the **Include entities from ABP modules** checkbox in the navigation property model and choosing the related module entity as in the following figure:

![Include Entities from ABP modules](../images/suite-include-entities-from-abp-modules.png)

In the example above, the `IdentityUser` entity is selected as the navigation property. You can choose any entity from the installed ABP modules in the navigation property model.

> **Note:** Ensure that your solution is built properly before establishing relationship between your own entity and a module entity because ABP Suite scans assemblies and finds which ABP modules you are using and lists their entities in the navigation property model if you have checked the **Include entities from ABP modules** checkbox.
#### Adding An Existing Entity as a Navigation Property

Alternatively, you can add `IdentityUser` entity (or any other entity) as a navigation property to an entity by manually entering the required information. See the screenshot below:

![navigation-property-books-page](../images/navigation-property-identityuser.png)

## User interface

### New book dialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Either create a new project or open an existing project that's based on an app o

# Generate the Entities

After opening the project in ABP Suite, scroll down to the bottom and click the **Load Entity From Database** button:![abpsuite2](../images/abpsuite2.png)
After opening the project in ABP Suite, scroll down to the bottom and click the **Load Entity From Database** button:![abpsuite2](../images/abpsuite2.8.1.png)


This will open the window seen below, choose the data source of your database and add the connection string of your project:![abpsuite3](../images/abpsuite3.png)
Expand All @@ -22,7 +22,7 @@ Click the lightning icon to test the connection, and then connect to the databas
Uncheck the Id property since it automatically gets generated, it'll cause an error if we generate it twice, then click **OK**:![abpsuite5](../images/abpsuite5.png)


After that, make sure the primary key type is selected, then click **Save and generate**:![abpsuite6](../images/abpsuite6.png)
After that, make sure the primary key type is selected, then click **Save and generate**:![abpsuite6](../images/abpsuite6.8.1.png)


The following GIF is a summary of the previous steps: ![SUTIE_GIF](../images/SUTIE_GIF.gif)
Expand Down
Loading

0 comments on commit 2226a93

Please sign in to comment.