Create a phone book item-mpa version using the ABP

Source: Internet
Author: User

This blog is part of a semi-tutorial blog, why is it a semi-tutorial? Because I'm not going to say something theoretical, not necessary. For theoretical information and basic information, visit the TKB to Jane and @ Sun Rui's blog to view documentation.

Sweep a little blind:

MPA: For multi-page, the way to bind data by rendering razor on the server side (etc.).

SPA: Then a single page, can be used as a front-end separation such as: vue,angular these front-end technology, the backend only need to provide WEBAPI (of course, there are other ways.)

1, first create a template solution "phonebook"

Open ABP's official website: http://www.aspnetboilerplate.com/Templates

Create "Yoyocms.phonebook" and click "Create my Project!" Buttons such as

Enter the verification code and start the download.

Photo Description:

We follow the instructions. So usually everyone in the group to mention so strange problems, first see if you have to follow this in operation.

2. Run the project example

Personal habits, I will first modify his connection string. The default is for Windows users to log on, I change to database sa user logon

<add name= "Default" connectionstring= "Data source=.; Database=abpzerotemplatev0; User Id=sa; password=123; "Providername=" System.Data.SqlClient "/>

  

The difference is that when you create a database relationship view, you'll find the permissions issue

Then I found an error ...

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or could not be accessed. Verify that the instance name is correct, and that SQL Server is configured to allow remote connections. (Provider:sql Network Interfaces, error:26-Error locating the specified server/instance)

Workaround:

Select to start the project, and then rebuild the solution. Then execute "update-database" again.

Run the project successfully

When you log in, you find a tenant name that needs to be filled in. As we downloaded earlier, Twotooth achyranthes Root's download information has been explained. The multi-tenancy mode is turned on by default.

3. Multi-tenancy feature demonstrates that the current page is the default multi-tenant login page, which means that different tenants are logged in, and the data they see is actually not the same. If the tenant name is not filled in by default, then the host user is logged in.

The host user can add and remove modifications and queries to the tenant information. Tenants do not have the right information to add other tenants.

3-1, login host user, account: admin password: 123qwe

There are other things you can do with default tenant "default", but now the template page only adds tenant information

, fields are given less, and you can add them to the field.

recommended if using multi-tenancy : The tenant name must consist of more than 2 letters, numbers 、-、 _, beginning with a letter

3-2. Login with tenant "DDXC"

As above, login will find [tenants] no longer. Because tenants do not have permission to add tenants.

Then we create a user "Yingmu" Password: "123qwe"

Prompt mailbox is already occupied, change a

3-3 Login with "Default" tenant

The same process is not demonstrated. Here you can see the information of the user list without the cherry blossom path.

This is the effect of multi-tenancy enabled.

The data information between the different tenants is separated.

If you don't understand what's going on with his classmates, look at:

We should all know this game.

A game of N-zones.

The different regions here are using multi-tenancy functions.

What are the scenarios for using multi-tenancy: Enterprise Templates sites, Staples, today's goals, task management systems, and so on, can be counted as multi-tenant usage scenarios.

The first time such a formal blog, if you have any questions and suggestions can find me in the group, we communicate and communicate with each other.

Group number: 579765441

Create a phone book item-mpa version using the ABP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.