Microsoft. NET Pet Shop 4.0 learning Tour (2)-project reference 1

Source: Internet
Author: User

Microsoft. NET Pet Shop 4.0Study Tour (2)

Project Reference relationship1

 

First seen Pet Shop 4.0 OfSource codeI think the structure is very complicated. Today I only discuss the business logic layer ( Bll . I abstracted the basic 6 Layer, they are: Dbutility , Model , Sqlserverdal , Idal , Dalfactory , Bll .


 

1,Physical access layer 【Dbutility]: Stores and retrieves databases, including database connection string Information and Public static methods (adding, deleting, modifying, and querying databases ). It does not reference any other layer and belongs to the bottom layer.

2, business entity layer [ Model ]: Abstracts database tables, abstract database tables into Entity object classes (with private members and common attribute methods ). One Model instance ( instance ) indicates a record of the database table. It does not reference any other layer and belongs to the lower layer.

3, Data access layer 【 Sqlserverdal ]: Responsible for spelling Data Access SQL Statement and stored procedure, and then process the results returned by the database in ( Sqlserverdal ), Wait for other layers to call. Sqlserverdal Get Model Attribute spelling SQL String, and then put Dbutility (MACHINE) to obtain the dataset ( Dataset ).So Sqlserverdal ReferenceModel .So Sqlserverdal ReferenceDbutility . Because Idal Yes Sqlserverdal Interface Layer, used to define the noun space and return type of the data access layer. Sqlserverdal Encapsulates the interface processing method. It will inherit from the interface layer.So Sqlserverdal ReferenceIdal .

4, Data access interface layer 【 Idal ]: Yes Sqlserverdal Method abstraction, Sqlserverdal The processed data object is Model , So Idal The processing parameter (noun space) is also Model .So Idal ReferencedModel .

5,Based on the above4Projects,4Relationship, we can clearly obtain the following project relationship graph:

Summary: Idal Reference Model , Sqlserverdal Reference Model , Sqlserverdal Reference Dbutility , Sqlserverdal Reference Idal .

 

6,Due to the time relationship, the next introduction will also2Projects and4Links:

 

 


Note! In blogCommunityOther than reprinted, must note:
By Clark Chan
And Source: http://clarkchan.cnblogs.com/
Otherwise, reprint is declined!

//////////////////////////////////////// //////////////////////////////////////// //////////////////////////////////////

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.