Step-by-step for the ABP Project
1. Download the ABP Project template,
Go to https://aspnetboilerplate.com/templates, select multipage Web Application, enter the Project name and verification code, and click Create My Project to download the code.
2. After the download is complete, it will jump to the terminal.
3. Install the latest version of VS2017, must be v15.3.5 or above, if the computer system is window7, also need to install update https://www.microsoft.com/en-us/download/details.aspx? Id = 40855 (power shell 4.0). The nuget console of vs2017 must be more than power shell 3.0.
4. Use vs2017 to open the downloaded project. Open tool-> Option-> nuget Package Manager-> package source, add a package Source Address: sources,
Then generate the project
5. Generate a database
(1) Find the appsettings. json file in the MyABP. Web. Mvc project and set the database connection string as needed.
(2) Open the tool> nuget Package Manager> Package Manager Console and change the default project to MyABP. entityFrameworkCore, enter the Update-Database command, and press Enter. Here, you need to execute the command twice. Anyway, I only execute the command once to generate a Database without a table ..
(3) set MyABP. web. mvc is the startup project and is set to run as MyABP. web, without IIS, run the project to see the website open login interface, enter the User name: admin, password: 123qwe, you can open the Home Page
(4) Click Tenants. If the database is sql2005 or sql2008, the following error occurs: SqlException: syntax error near 'offset. The option NEXT in the FETCH statement is invalid.
The default paging SQL statement generated by ef core does not support databases of earlier versions. Modify the MyABPDbContextConfigurer file in the myabc. EntityFrameworkCore project as follows:
Public static class MyABPDbContextConfigurer {public static void Configure (DbContextOptionsBuilder <MyABPDbContext> builder, string connectionString) {// builder. useSqlServer (connectionString); // supports sql2005, 2008 paging builder. useSqlServer (connectionString, B => B. useRowNumberForPaging ();} public static void Configure (DbContextOptionsBuilder <MyABPDbContext> builder, DbConnection connection) {// builder. useSqlServer (connection); // supports sql2005, 2008 paging builder. useSqlServer (connection, B => B. useRowNumberForPaging ());}}