Typical oop applications: entity classes, typical oop Application entities

Source: Internet
Author: User

Typical oop applications: entity classes, typical oop Application entities

1.

You need to know the relationship between the three figures.

 

2. Object Type and Database Type

 

 

3. Comparison between readonly and const

 

The differences between the two are as follows:

① Const can modify fields or local variables in the class, while readonly can only modify fields of the class.

② For the reference type, except string, it is not declared as const. If it must be declared as const, the initial value can only be null.

③ The const modifier must be assigned a value during the declaration, while the readonly constant can be assigned a value when the program is running.

 

4. An important tool for transferring data in the layered architecture of object classes, compared with Dataset,

Strong object type, object-oriented, easy to control,

Entity classes enable development at a level outside the data access layer without having to understand the database architecture,

Decouples these layers from databases.

 

☆5. Both const and readonly can be used to modify constants.

 

Related Article

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.