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.
> 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`
@ -141,6 +141,9 @@ For more samples, go to [ABP CLI Create Solution Samples](new-command-samples.md
* `angular`: Angular UI. There are some additional options for this template:
* `--tiered`: The Auth Server project comes as a separate project and runs at a different endpoint. It separates the Auth Server from the API Host application. If not specified, you will have a single endpoint in the server side. (*Available for* ***Team*** *or higher licenses*)
* `--progressive-web-app` or `-pwa`: Specifies the project as Progressive Web Application.
* `blazor-webapp`: Blazor Web App UI. There are some additional options for this template:
* `--tiered`: The Auth Server and the API Host project comes as separate projects and run at different endpoints. It has 3 startup projects: *HttpApi.Host*, *AuthServer* and *Blazor* and and each runs on different endpoints. If not specified, you will have a single endpoint for your web project.
* `--progressive-web-app` or `-pwa`: Specifies the project as Progressive Web Application.
* `blazor`: Blazor UI. There are some additional options for this template:
* `--tiered`The Auth Server project comes as a separate project and runs at a different endpoint. It separates the Auth Server from the API Host application. If not specified, you will have a single endpoint in the server side. (*Available for* ***Team*** *or higher licenses*)
* `--progressive-web-app` or `-pwa`: Specifies the project as Progressive Web Application.
@ -4,7 +4,7 @@ This document begins by **introducing the default structure** provided by [the a
> This document is for who want to fully understand and customize the database structure comes with [the application startup template](../../../solution-templates/layered-web-application). If you simply want to create entities and manage your code first migrations, just follow [the startup tutorials](../../../tutorials/book-store/part-01.md).
### Source Code
## Source Code
You can find the source code of the example project referenced by this document [here](https://github.com/abpframework/abp-samples/tree/master/EfCoreMigrationDemo). However, you need to read and understand this document in order to understand the example project's source code.
@ -554,4 +554,4 @@ This document explains how to split your databases and manage your database migr
## Source Code
You can find the source code of the example project referenced by this document [here](https://github.com/abpframework/abp-samples/tree/master/EfCoreMigrationDemo). You can also find the changes explained in this document as a [single commit](https://github.com/abpframework/abp-samples/pull/95/commits/c2ffd76175e0a6fdfcf6477bbaea23dc2793fedd).
You can find the source code of the example project referenced by this document [here](https://github.com/abpframework/abp-samples/tree/master/EfCoreMigrationDemo). You can also find the changes explained in this document as a [single commit](https://github.com/abpframework/abp-samples/pull/95/commits/c2ffd76175e0a6fdfcf6477bbaea23dc2793fedd).
@ -31,7 +31,7 @@ Error Message is an instance of the `RemoteServiceErrorResponse` class. The simp
There are **optional fields** those can be filled based upon the exception that has occurred.
##### Error Code
#### Error Code
Error **code** is an optional and unique string value for the exception. Thrown `Exception` should implement the `IHasErrorCode` interface to fill this field. Example JSON value:
@ -46,7 +46,7 @@ Error **code** is an optional and unique string value for the exception. Thrown
Error code can also be used to localize the exception and customize the HTTP status code (see the related sections below).
##### Error Details
#### Error Details
Error **details** in an optional field of the JSON error message. Thrown `Exception` should implement the `IHasErrorDetails` interface to fill this field. Example JSON value:
@ -60,7 +60,7 @@ Error **details** in an optional field of the JSON error message. Thrown `Except
}
```
##### Validation Errors
#### Validation Errors
**validationErrors** is a standard field that is filled if the thrown exception implements the `IHasValidationErrors` interface.
@ -340,4 +340,4 @@ Here, a list of the options you can configure:
@ -183,7 +183,7 @@ public class MyService : ITransientDependency
}
````
##### Format Arguments
### Format Arguments
Format arguments can be passed after the localization key. If your message is `Hello {0}, welcome!`, then you can pass the `{0}` argument to the localizer like `_localizer["HelloMessage", "John"]`.
@ -255,4 +255,4 @@ See the following documents to learn how to reuse the same localization texts in
* [Localization for the MVC / Razor Pages UI](../ui/mvc-razor-pages/javascript-api/localization)
* [Localization for the Blazor UI](../ui/blazor/localization.md)
* [Localization for the Angular UI](../ui/angular/localization.md)
@ -14,7 +14,7 @@ An **audit log object** (see the Audit Log Object section below) is typically cr
> [Startup templates](../../solution-templates) are configured for the audit logging system which is suitable for most of the applications. Use this document for a detailed control over the audit log system.
### Database Provider Support
## Database Provider Support
* Fully supported by the [Entity Framework Core](../data/entity-framework-core) provider.
* Entity change logging is not supported by the [MongoDB](../data/mongodb) provider. Other features work as expected.
Add [Volo.Abp.Json.Newtonsoft](https://www.nuget.org/packages/Volo.Abp.Json.Newtonsoft) package and depends on `AbpJsonNewtonsoftModule` to replace the `System Text Json`.
#### AbpNewtonsoftJsonSerializerOptions
### AbpNewtonsoftJsonSerializerOptions
- **JsonSerializerSettings(`Newtonsoft.Json.JsonSerializerSettings`)**: Global options for Newtonsoft library operations. See [here](https://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_JsonSerializerSettings.htm) for reference.
@ -7,7 +7,7 @@ If you add the account module to your project;
- "My account" link in the current user dropdown on the top bar will redirect the user to a page in the account module.
- You can switch the authentication flow to the resource owner password flow.
### Account Module Implementation
## Account Module Implementation
Install the `@abp/ng.account` NPM package by running the below command:
@ -49,7 +49,7 @@ const routes: Routes = [
export class AppRoutingModule {}
```
### Account Public Module Implementation for Commercial Templates
## Account Public Module Implementation for Commercial Templates
The pro startup template comes with `@volo/abp.ng.account` package. You should update the package version to v4.3 or higher version. The package can be updated by running the following command:
@ -97,11 +97,11 @@ const routes: Routes = [
export class AppRoutingModule {}
```
### My Account Page
## My Account Page
Before v4.3, the "My account" link in the current user dropdown on the top bar redirected the user to MVC's profile management page. As of v4.3, if you added the account module to your project, the same link will land on a page in the Angular UI account module instead.
### Personal Info Page Confirm Message
## Personal Info Page Confirm Message
When the user changes their own data on the personal settings tab in My Account, The data can not update the CurrentUser key of Application-Configuration. The information of the user is stored in claims. The only way to apply this information to the CurrentUser of Application-Configuration is user should log out and log in. When the Refresh-Token feature is implemented, it will be fixed. So We've added a confirmation alert.
@ -119,11 +119,11 @@ const routes: Routes = [
export class AppRoutingModule {}
```
### Security Logs Page [COMMERCIAL]
## Security Logs Page [COMMERCIAL]
Before v4.3, the "Security Logs" link in the current user dropdown on the top bar redirected the user to MVC's security logs page. As of v4.3, if you added the account module to your project, the same link will land on a page in the Angular UI account public module instead.
### Resource Owner Password Flow
## Resource Owner Password Flow
OAuth is preconfigured as authorization code flow in Angular application templates by default. If you added the account module to your project, you can switch the flow to resource owner password flow by changing the OAuth configuration in the _environment.ts_ files as shown below:
The current user information stored in Config State.
### How to Get a Current User Information Configuration
## How to Get a Current User Information Configuration
You can use the `getOne` or `getOne$` method of `ConfigStateService` to get a specific configuration property. For that, the property name should be passed to the method as parameter.
@ -215,7 +215,7 @@ The localizations above can be used like this:
As of v2.9 ABP has RTL support. If you are generating a new project with v2.9 and above, everything is set, you do not need to do any changes. If you are migrating your project from an earlier version, please follow the 2 steps below:
#### Step 1. Create Chunks for Bootstrap LTR and RTL
### Step 1. Create Chunks for Bootstrap LTR and RTL
Find [styles configuration in angular.json](https://angular.io/guide/workspace-config#style-script-config) and make sure the chunks in your project has `bootstrap-rtl.min` and `bootstrap-ltr.min` as shown below.
@ -257,7 +257,7 @@ Find [styles configuration in angular.json](https://angular.io/guide/workspace-c
}
```
#### Step 2. Clear Lazy Loaded Fontawesome in AppComponent
### Step 2. Clear Lazy Loaded Fontawesome in AppComponent
If you have created and injected chunks for Fontawesome as seen above, you no longer need the lazy loading in the `AppComponent` which was implemented before v2.9. Simply remove them. The `AppComponent` in the template of the new version looks like this:
@ -5,7 +5,7 @@ This documentation describes how the navigation elements are sorted and how to c
- When you want to add the `Navigation Element` you can use the `RoutesService`. For more details, see the [document](../angular/modifying-the-menu.md).
- However, in this documentation, we will talk more about how to sort the navigation elements.
### Order Property
## Order Property
- Normally, you are able to sort your routes with this property. But you can customize our default sorting algorithm.
@ -41,7 +41,7 @@ The following tools should be installed on your development machine:
## Creating a New Solution
> 🛈 This document uses [ABP Studio](../studio/index.md) to create new ABP solutions. **ABP Studio** is in the beta version now. If you have any issues, you can use the [ABP CLI](../cli/index.md) to create new solutions. You can also use the [getting started page](https://abp.io/get-started) to easily build ABP CLI commands for new project creations.
> This document uses [ABP Studio](../studio/index.md) to create new ABP solutions. **ABP Studio** is in the beta version now. If you have any issues, you can use the [ABP CLI](../cli/index.md) to create new solutions. You can also use the [getting started page](https://abp.io/get-started) to easily build ABP CLI commands for new project creations.
> ABP startup solution templates have many options for your specific needs. If you don't understand an option that probably means you don't need it. We selected common defaults for you, so you can leave these options as they are.
ABP offers an **opinionated architecture** to build enterprise software solutions with **best practices** on top of the **.NET** and the **ASP.NET Core** platforms. It provides the fundamental infrastructure, production-ready startup templates, pre-built application modules, UI themes, tooling, guides and documentation to implement that architecture properly and **automate the details** and repetitive works as much as possible.
## Why ABP Platform?
The following pages outline why you should use the ABP Platform and how it is used:
`AbpOpenIddictAspNetCoreOptions` can be configured in the `PreConfigureServices` method of your OpenIddict [module](../framework/architecture/modularity/basics.md).
@ -516,7 +516,7 @@ In the module's `app` directory there are six projects(including `angular`)
* `OpenIddict.Demo.Client.BlazorWASM:` ASP NET Core Blazor application using `OidcAuthentication` for authentication.
* `angular`: An angular application that integrates the abp ng modules and uses oauth for authentication.
#### How to run?
### How to run?
Confirm the connection string of `appsettings.json` in the `OpenIddict.Demo.Server` project. Running the project will automatically create the database and initialize the data.
After running the `OpenIddict.Demo.API` project, then you can run the rest of the projects to test.
> Please **refer to the [Multi-Tenancy](../framework/architecture/multi-tenancy) documentation** to understand the multi-tenancy system of the ABP. This document focuses on the Tenant Management module.
### About the ABP SaaS Module
## About the ABP SaaS Module
The [SaaS Module](https://abp.io/modules/Volo.Saas) is an alternative implementation of this module with more features and possibilities. It is distributed as a part of the [ABP](https://abp.io/) subscription.
@ -115,7 +115,7 @@ To create a new entity, make sure the *-New entity-* is selected in the **Entity
## Properties
##### Define a property
### Define a property
A property is a field in the entity which refers a column in the relational database table or a `JSON` field in `NoSQL` database collection. In the properties section, you can manage the properties your entity. To add a new property, click the "Add Property" button on the top-right of the page.
@ -306,7 +306,7 @@ abp suite generate --entity D:\Projects\BookStore\.suite\entities\Book.json --so
In this example, `Book.json` was previously created via ABP Suite.
##### Parameters
### Parameters
* `--entity` or `-e`: Path of the entity's JSON file.
* `--solution` or `-s`: Path of the target solution file (***.sln**).
If you have an existing database table, you can generate the entities using ABP Suite and create a CRUD page based on those entities, let's get started.
# Create/open your project
## Create/open your project

Either create a new project or open an existing project that's based on an app or module template.
# Generate the Entities
## Generate the Entities
After opening the project in ABP Suite, scroll down to the bottom and click the **Load Entity From Database** button:
@ -41,6 +41,6 @@ After that, make sure the primary key type is selected, then click **Save and ge
The following GIF is a summary of the previous steps: 
# Run the Project!
## Run the Project!
After that, run the project and watch the magic! An easy CRUD app using the entities from an existing database table!