Copyright: This is an original post by the blogger and may not be reproduced without the blogger's permission. https://blog.csdn.net/huyuyang6688/article/details/41526763
Entity Framework is based on ADO.NET, data-oriented "entity framework". Hereafter referred to as EF.
It uses the abstraction of data structures, converting each database object into an entity, data fields into properties, and relationships into associations, so that the database E/R model is completely transformed into an object model, allowing programmers to call and access it in the most familiar programming language.
Personally, I think one of the more classic explanations of EF from wikipedia is that it allows the upper application code to access data as if it were object-oriented.
In the past, we have read the database directly, and business data are used DataSet, DataTable, etc. to pass values, resulting in ugly code and a serious departure from the OO idea.
For example, when storing to the database, the entity framework is mainly used to help us store an object to the database (that is, through the object and the database "deal"), as long as the object to the entity framework, do not have to write their own SQL statements, it will help us automatically generate SQL statements, where the generated SQL statements sent to the database through ADO.NET, that is, to operate the database or through ADO.NET, so the first sentence of this article said "EF is Based on ADO.NET , a data-oriented 'entity framework'."
The exact process can be represented in the following diagram.