Reposted on vs to create Asp.net Simple Layer 3

Source: Internet
Author: User

Because it is not really a good understanding of the three-layer structure and construction, we use vs2005 to establish a "so-called three-layer" practice exercise, and further understand

(Note: It is used in vs2008 team, but it is also useful in vs2005)

(1) create a project-Other project types-Vs blank solution

 

 

 

 

 

 

 

 

 

 

 

 

 

(2) add three class libraries and rename them to Dal and BLL.

Add some common classes to The bll class library

In the Dal class library, create two folders: Model and Dal,

Soft placement in ModelCodeThe model (entity class) generated by the generator. Place the Dal (data entity class) generated by the soft code generator in the Dal ),

In the dbhelper class library, place the dbhelpersql. CS class to perform database operations.

(3) add website pages and other

Overall effect, as shown in figure

As a beginner, I am not very familiar with the layer-3 architecture, but I feel that it saves a lot of time compared to the previous single-layer website. So I want to continue to deepen my understanding through continuous practice and learning, I hope some experts will not be enlightened! I also hope it will be helpful for beginners like me. My website has been directly implemented in this way. In my opinion, it is more practical.

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.