asp.net beginner: petshop4.0 Design Instructions

Source: Internet
Author: User
asp.net| Beginner | design

petshop4.0 Design Instructions

first, the project name and Description: (Realization step: 4-3-6-5-2-1)

1, web= presentation layer

2. bll= Business Logic Layer

3. idal= data Access Layer Interface definition

4. model= Business Entity

5, dalfactory= the data layer of the abstract factory (create reflection)

6. Sqlserverdal=sqlserver data Access Layer/oracledal=oracle data access Layer

Dbutility Database Access Component base class

second, project reference relationship

1, Web reference BLL.

2, BLL reference Idal,model, use Dalfactory to create an instance.

3, Idal reference Model.

4, Model without reference.

5, Dalfactory reference Idal, by reading the web.config set in the assembly, load the instance of the class, return to BLL use.

6, Sqlserverdal Reference Model and Idal, Dalfactory loaded assembly, implementation of the method in the interface.

Third, the realization step

1. Create model to realize business entity.

2, create idal, implement interface.

3, create Sqlserverdal, implement the method in the interface.

4, increase the configuration information in the web.config, for the Sqlserverdal assembly.

5, create dalfactory, return an instance of the assembly's specified class.

6. Create BLL, call Dalfactory, get an instance of the assembly-specified class, and complete the data manipulation method.

7, create the Web, call the BLL in the data operation method.

Attention:

1, the assembly name in the web.config must be the same as the output assembly name in Sqlserverdal.

2, dalfactory only need a dataaccess class, you can complete the creation of all the assembly instances.

3. After the project is created, be careful to modify the default namespace and assembly name for each purpose.

4, pay attention to modify the project dependencies in the solution.

5. Note that the project references are added to the solution.



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.