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.