The general Entity Framework includes the following functions:
1. Interaction with physical storage
The reason is very simple. Data cannot always be stored in the memory and will eventually be stored. Therefore, a basic function of the Entity Framework is to solve the Interaction Problem with the physical storage. The physical storage here mainly includes file and database systems. Although it is not very common to use files as physical storage methods, it is also useful. There are not many small application systems and tables, when the relationship between data is not very complex, you can also directly use files for storage. There is no need to attach a database to such a small application. The database is used, and some configuration information can be stored in files.
The physical storage method that uses databases as entities is a common method in application systems. Therefore, the general Entity Framework must support the function of interacting with databases:
A) supports multiple databases, at least several mainstream database systems (shielding database differences );
B) Basic Database Operations (definition, addition, modification, deletion, query, etc)
C) Support for database transactions
D) supports data synchronization between the cache and the database (this is not mandatory, but a good framework should at least reserve an extension to this requirement ).
2. Entity Management
The following functions are basic for Object Management:
A) add, modify, delete, and query entities, and finally reflect these operations to the database;
B) SQL statement support (this function must be reserved when some tasks cannot be completed completely for the entity)
C) transaction support (it should be reflected in database transactions in the end, and good support for cross-data transactions)
D) The object cache service (including whether the cache is required, the cache mechanism, and the invalidation Policy). If you want to proceed further, you should also support data cache loading condition settings (this function is actually very simple, however, many frameworks currently do not have this function)
E) data synchronization between the cache and the database must also be provided to support caching;
F) if caching is supported, concurrent conflict detection and processing mechanisms must also be provided;
Some features also provide some more powerful functions:
A) object advanced query, such as association query and subquery. For example, esql is similar to SQL.
B) Batch Processing of entity Operations.
C) single-instance and multi-instance modes for entity operation
The above columns are basically some basic functions that the entity framework should provide, and some functions such as object validity checks can be integrated here or not, but some regular things still need to be provided, such as providing verification rules in the form of metadata.