Getting Started
This tutorial assumes that you've already purchased an ABP Commercial license and have an active ABP Commercial account.
This document assumes that you prefer to use MVC / Razor Pages as the UI framework and MongoDB as the database provider. For other options, please change the preference on top of this document.
Create a new project
This document assumes that you prefer to use MVC / Razor Pages as the UI framework and MongoDB as the database provider. For other options, please change the preference on top of this document.
There are two ways of creating a new project: ABP Suite and ABP CLI.
Using the ABP Suite to create a new project
Run the ABP Suite with the following command:
abp suite
This command starts the ABP Suite and opens in your default browser:
Click to the Create solution button and fill the modal form:
Select the UI framework, Database provider and other option based on your requirements then click to the OK button.
You can use different level of namespaces; e.g. BookStore, Acme.BookStore or Acme.Retail.BookStore.
Using the ABP CLI to create a new project
Use the new
command of the ABP CLI to create a new project:
abp new Acme.BookStore -t app-pro -d mongodb
-t
argument specifies the startup template name.app-pro
is the startup template that contains the essential ABP Commercial Modules pre-installed and configured for you.-d
argument specifies the database provider,mongodb
in this case.
You can use different level of namespaces; e.g. BookStore, Acme.BookStore or Acme.Retail.BookStore.
ABP CLI commands & options
ABP CLI document covers all of the available commands and options for the ABP CLI. The main difference for the ABP Commercial is the template names. See the ABP Commercial Startup Templates document for other commercial templates.
The solution structure
The solution has a layered structure (based on the Domain Driven Design) and contains unit & integration test projects. See the solution structure document to understand the solution structure in details.
MongoDB Transactions
The startup template disables transactions in the .MongoDB
project by default. If your MongoDB server supports transactions, you can enable the it in the YourProjectMongoDbModule class:
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Auto;
});
Or you can delete this code since this is already the default behavior.