You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -12,9 +30,9 @@ We can use **admin** user name and **123qwe** password in first run the applicat
12
30
13
31
After changing password we are redirected to the **backend application**.
14
32
15
-
## User Lockout
33
+
###User Lockout
16
34
17
-
As seen in the previous section, you can configure user lockout settings. Users are lockout when they enter wrong password for a specified count and duration.
35
+
Users are lockout when they enter wrong password for a specified count and duration. You can configure lockout settings in the settings page of the application.
This document is aimed to create and run an ASP.NET Zero based project in just 10 minutes. It's assumed that you already [purchased](https://aspnetzero.com/Prices) and created your ASP.NET Zero account.
4
-
5
-
## Login
6
-
7
-
[Login](https://aspnetzero.com/Account/Login) to this web site with your user name and password. Then you will see [Download](https://aspnetzero.com/Download) link on the main menu.
3
+
This document is aimed to create and run an ASP.NET Zero based project in just 5 minutes. It's assumed that you already [purchased](https://aspnetzero.com/Pricing) and created your ASP.NET Zero account.
8
4
9
5
## Create Your Project
10
6
11
-
Go to the [download](https://aspnetzero.com/Download) page. You will see a form as shown below:
7
+
[Login to aspnetzero.com](https://aspnetzero.com/Account/Login) with your user name and password. Go to the [download](https://aspnetzero.com/Download) page. You will see a form as shown below:
Select **ASP.NET Core & Angular** as Project Type and fill other required fields. Your project will be ready in one minute. When you open the downloaded zip file, you will see two folders:
16
12
17
13
<imgsrc="images/angular-solution-folders.png"alt="Client Server folders"class="img-thumbnail" />
18
14
19
-
-**angular** folder contains the [Angular application](Features-Angular) which is configured to work with [angular-cli](https://cli.angular.io/).
20
-
-**aspnet-core** folder contains the [server side](Features-Mvc-Core) ASP.NET Core solution and configured to work with [Visual Studio](https://www.visualstudio.com/vs/community/).
15
+
-**angular** folder contains the Angular UI application which is configured to work with the[angular-cli](https://cli.angular.io/).
16
+
-**aspnet-core** folder contains the server side ASP.NET Core solution and configured to work with [Visual Studio](https://www.visualstudio.com/vs/community/).
21
17
22
18
### Merging Client and Server Solutions
23
19
24
-
Client and Server solutions are designed to work separately by default but if you want to work on a single Visual Studio solution, you can select "One Solution" checkbox while downloading your project.
20
+
Client and Server solutions are designed to work separately by default. If you want to work on a single Visual Studio solution, you can select "Single Solution" checkbox while downloading your project.
25
21
26
-
## ASP.NET Core Application
22
+
## Pre Requirements
27
23
28
-
When you open the server side solution **\*.Web.sln** in **Visual Studio 2017+**, you will see the solution structure as below:
24
+
-[Visual Studio 2017 (v15.9.0+)](https://www.visualstudio.com) (for backend ASP.NET Core application)
-[Node.js 6.9+ with NPM 3.10+](https://nodejs.org/en/download/)
27
+
-[Gulp](https://www.npmjs.com/package/gulp) (*must be installed globally*)
28
+
-[Yarn](https://yarnpkg.com/)
29
29
30
-
If you want to work on only Xamarin project, open **\*.Mobile.sln** solution. If you want to work on both Xamarin and Web projects, open **\*.All.sln** solution.
30
+
## ASP.NET Core Application
31
+
32
+
When you open the server side solution (**\*.Web.sln**) in **Visual Studio 2017+**, you will see the solution structure as below:
Right click the **.Web.Host** project and select "**Set as StartUp project**": Then **build** the solution. It may take a longer time during the first build since all **nuget** packages will be restored.
36
+
> If you want to work on only Xamarin project, open **\*.Mobile.sln** solution. If you want to work on both of Xamarin and Web projects, open **\*.All.sln** solution.
37
+
38
+
Right click the **.Web.Host** project and select "**Set as StartUp project**". Then **build** the solution. It may take a longer time during the first build since all **nuget** packages will be restored.
35
39
36
40
### Database
37
41
@@ -51,11 +55,11 @@ We have two options to create and migrate database to the latest version.
51
55
52
56
##### ASP.NET Zero Migrator Application
53
57
54
-
ASP.NET Zero solution includes a **.Migrator** (like Acme.PhoneBookDemo.Migrator) project in the solution. You can run this tool for database migrations on development and production (see [development guide](Features-Angular) for more information).
58
+
ASP.NET Zero solution includes a **.Migrator** (like Acme.PhoneBookDemo.Migrator) project in the server side solution. You can run this tool for database migrations on development and production (see [migrator docs](Migrator-Console-Application) for more information).
55
59
56
60
##### Entity Framework Migration Command
57
61
58
-
You can also use Entity Framework's built-in tools for migrations. Open **Package Manager Console** in Visual Studio, set *.**EntityFrameworkCore** as the **Default Project** and run the **Update-Database** command as shown below:
62
+
You can also use Entity Framework Core's built-in tools for migrations. Open **Package Manager Console** in Visual Studio, set *.**EntityFrameworkCore** as the **Default Project** and run the **Update-Database** command as shown below:
59
63
60
64
<imgsrc="images/update-database-ef-core.png"alt="dotnet ef database update"class="img-thumbnail" />
61
65
@@ -65,20 +69,19 @@ This command will create your database and fill initial data. You can open SQL S
65
69
66
70
You can use EF console commands for development and Migrator.exe for production. But notice that; Migrator.exe supports running migrations in multiple databases at once, which can be useful in development/production for multi tenant applications.
67
71
68
-
### Multi-Tenancy
72
+
### Configure Multi-Tenancy
69
73
70
-
ASP.NET Zero supports multi-tenant and single-tenant applications. Multi-tenancy is **enabled by default**. If you don't have an idea about multi-tenancy, you can read it on [wikipedia.org/wiki/Multitenancy](https://en.wikipedia.org/wiki/Multitenancy). If you don't want to create a multi-tenant application, you can **disable** it by setting **PhoneBookDemoConsts.MultiTenancyEnabled** to false in the ***.Core.Shared** project.
74
+
ASP.NET Zero supports multi-tenant and single-tenant applications. Multi-tenancy is **enabled by default**. If you don't have an idea about multi-tenancy, you can read it on [wikipedia.org/wiki/Multitenancy](https://en.wikipedia.org/wiki/Multitenancy). If you don't want to create a multi-tenant application, you can **disable** it by setting **PhoneBookDemoConsts.MultiTenancyEnabled** to false in the ***.Core.Shared** project (name of the PhoneBookDemoConsts will be like *YourProjectName*Consts for your project).
71
75
72
76
### Run API Host
73
77
74
-
Once you've done the configuration, you can run the application. Server
75
-
side application only contains APIs. When you start the application you will see a login page:
76
-
77
-
**NOTE:** If your project is a merged project, you will not see the login page when you start the host project. Basically you need to manually navigate to http://localhost:22742/ui/login.
78
+
Once you've done the configuration, you can run the application. Server side application only contains APIs. When you start the application you will see a login page:
If you log in to host application, then you will see host main page:
82
+
**NOTE:** If your project is a merged project, you will not see the login page when you start the host project. Basically you need to manually navigate to http://localhost:22742/ui/login.
83
+
84
+
If you log in to host application, then you will see a page like that:
Navigate to the Angular folder, open a command line and run the following command to restore packages:
96
+
Navigate to the **angular folder**, open a command line and run the following command to restore the packages:
102
97
103
98
yarn
104
99
105
-
**Note:** If you downloaded merged project then you should run commands on `Host` folder not `Angular`folder.
100
+
**Note:** If you've downloaded a merged project then you should run commands on `Host` folder (the folder contaning the *.Web.Host project).
106
101
107
-
We suggest to use [yarn](https://yarnpkg.com/) because NPM has some problems. It is slow and can not consistently resolve dependencies, yarn solves those problems and it is compatible to NPM as well.
102
+
We use [yarn](https://yarnpkg.com/) because NPM has some problems; It is slow and can not consistently resolve dependencies. Yarn solves those problems and it is compatible to NPM as well.
108
103
109
104
### Running The Application
110
105
@@ -118,24 +113,26 @@ Once the application compiled, you can browse <http://localhost:4200> in your br
118
113
119
114
### Login
120
115
121
-
All ready.. just run your solution to enter to the login page:
116
+
All ready! Just run your solution to enter to the login page:
If multi-tenancy is enabled, you will see the current tenant and a change link. If so, click to **Change**like and enter **default** as tenant name. If you leave it empty, you login as the host admin user. Then enter **admin** as user name and **123qwe** as password. You should change your password at first login.
120
+
If multi-tenancy is enabled, you will see the current tenant and a change link. If so, click to **Change** and enter **default** as tenant name. If you leave it empty, you login as the host admin user. Then enter **admin** as user name and **123qwe** as password (remember to change it to a more secure password on production!).
126
121
127
122
### Application UI
128
123
129
-
After you login to the application, you will see the sample dashboard screen:
124
+
After login to the application, you will see the sample dashboard screen:
ASP.NET Zero Power Tools lets you to create a new page from the backend to the UI layer by just typing your entity properties. It creates the entity, related permissions, application services, client-side code, applies DB migrations and adds to the main menu. Finally you will have a CRUD page that is capable of insert, update, delete, list, excel export functions. To minimize the effort of creating a new page, install the Power Tools from the following link:
130
+
ASP.NET Zero Power Tools lets you to create a new page from the database to the UI layer by just typing your entity properties. It creates the entity, related permissions, application services, DTOs, client-side code, a menu element and so on... It also creates & applies database migrations.
131
+
132
+
Finally you will have a CRUD page with insert, update, delete, list and excel export functions. To minimize the effort of creating a new page, install the Power Tools from the following link:
Your solution is up and working. See the [Xamarin Development Guide](Development-Guide-Xamarin) or [Angular Overview](Overview-Angular) document for more information.
0 commit comments