diff --git a/docs/Getting-Started-AspNetCore-MVC-Template.md b/docs/Getting-Started-AspNetCore-MVC-Template.md new file mode 100644 index 0000000000..3e6310592c --- /dev/null +++ b/docs/Getting-Started-AspNetCore-MVC-Template.md @@ -0,0 +1,64 @@ +## ASP.NET Core MVC Template + +### Creating a new project + +Go to the template creation page, enter a project name and create your project as shown below: + +![bookstore-create--template](images/bookstore-create-template.png) + +When you click to the *create* button, a new Visual Studio solution is created and downloaded with the name you have provided. + +### The Solution Structure + +Open the zip file downloaded and open in **Visual Studio 2017 (15.7.0+)**: + +![bookstore-visual-studio-solution](images/bookstore-visual-studio-solution.png) + +The solution has a layered structure (based on Domain Driven Design) where; + +* **.Domain** project is the domain layer. +* **.Application** project is the application layer. +* **.Web** project is the presentation layer. +* **.EntityFrameworkCore** project is the EF Core integration package. + +The solution does also contain unit & integration test projects properly configured to work with **EF Core** & **SQLite in-memory** database. + +### Creating the Database + +Check the **connection string** in the **appsettings.json** file under the **.Web** project: + +````json +{ + "ConnectionStrings": { + "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True" + } +} +```` + +The solution is configured to use **Entity Framework Core** with **MS SQL Server** (EF Core supports [various](https://docs.microsoft.com/en-us/ef/core/providers/) database providers, so you can use another DBMS if you want). + +Right click to the **.Web** project and select **Set as StartUp Project**: + +![set-as-startup-project](images/set-as-startup-project.png) + +Open the **Package Manager Console**, select **.EntityFrameworkCore** project as the **Default Project** and run the `Update-Database` command: + +![pcm-update-database](D:\Github\abp\docs\images\pcm-update-database.png) + +This will create a new database with the name configured. + +### Running the Application + +You can now run the application which will open the **home** page: + +![bookstore-homepage](images/bookstore-homepage.png) + +Click to the **Login** button, enter `admin` as the username and `1q2w3E*` as the password to login to the application. + +Startup template includes the **identity management** module. Once you login, the Identity management menu will be available where you can manage **roles**, **users** and their **permissions**. + +![bookstore-user-management](D:\Github\abp\docs\images\bookstore-user-management.png) + +### What's Next? + +* [Step by step application development tutorial for ASP.NET Core MVC](Tutorials/AspNetCore-Mvc/Part-I.md) \ No newline at end of file diff --git a/docs/Index.md b/docs/Index.md index e5009a9946..6e782ef136 100644 --- a/docs/Index.md +++ b/docs/Index.md @@ -3,8 +3,14 @@ ## Table of Contents * Getting Started - * With Console Application - * With ASP.NET Core Web Application + * From Startup Templates + * [ASP.NET Core MVC Template](Getting-Started-AspNetCore-MVC-Template.md) + * From Empty Projects + * With Console Application + * With ASP.NET Core Web Application +* Tutorials + * Application Development + * [With ASP.NET Core MVC](Tutorials/AspNetCore-Mvc/Part-I.md) * Fundamentals * Dependency Injection * AutoFac Integration diff --git a/docs/Tutorials/AspNetCore-Mvc/Part-I.md b/docs/Tutorials/AspNetCore-Mvc/Part-I.md new file mode 100644 index 0000000000..9b3c968692 --- /dev/null +++ b/docs/Tutorials/AspNetCore-Mvc/Part-I.md @@ -0,0 +1,3 @@ +## ASP.NET Core MVC Tutorial - Part I + +TODO \ No newline at end of file diff --git a/docs/images/bookstore-create-template.png b/docs/images/bookstore-create-template.png new file mode 100644 index 0000000000..7cc96c8c94 Binary files /dev/null and b/docs/images/bookstore-create-template.png differ diff --git a/docs/images/bookstore-homepage.png b/docs/images/bookstore-homepage.png new file mode 100644 index 0000000000..5e5b512220 Binary files /dev/null and b/docs/images/bookstore-homepage.png differ diff --git a/docs/images/bookstore-user-management.png b/docs/images/bookstore-user-management.png new file mode 100644 index 0000000000..bc3c176557 Binary files /dev/null and b/docs/images/bookstore-user-management.png differ diff --git a/docs/images/bookstore-visual-studio-solution.png b/docs/images/bookstore-visual-studio-solution.png new file mode 100644 index 0000000000..b47636cd68 Binary files /dev/null and b/docs/images/bookstore-visual-studio-solution.png differ diff --git a/docs/images/pcm-update-database.png b/docs/images/pcm-update-database.png new file mode 100644 index 0000000000..ac53f0db4f Binary files /dev/null and b/docs/images/pcm-update-database.png differ diff --git a/docs/images/set-as-startup-project.png b/docs/images/set-as-startup-project.png new file mode 100644 index 0000000000..13da5caf6c Binary files /dev/null and b/docs/images/set-as-startup-project.png differ