ORM, ie Object-relationl mapping, its role is to make a mapping between the relational database and objects, so that we do not need to deal with the complex SQL statement when we do it, as long as it is usually operated in the specific operational database. Operating it is the same. Below is a description of it in a piece of article reprinted online: Let us start from O / R. The letter O originated from "object" (Object), and R comes from "relational". Almost all programs, there are objects and relational databases. In the business logic layer and the user interface layer, we are object-oriented. When the object information changes, we need to save the information of the object in the relational database. When you develop an application (not using O / R mapping), you may write a lot of data access layers, used to save, delete, read object information, and so on. You have written a lot of methods in DAL to read object data, change status objects, and the like. These codes are always repeated. If you open your nearest program, look at DAL code, you will definitely see a lot of approximately general mode. In order to save objects, we pass an object, add SQLParameter for the SQLCommand object, corresponding to all attributes and objects, set SQLCommand's CommandText attribute as a stored procedure, and then run SQLCommand. Write these code for each object. In addition, is there a better way? Yes, an O / R mapping is introduced. In essence, an O / R mapping will generate DAL for you. It is better to use O / R mapping with its own written DAL code. You save, delete, read objects with O / R mapping, O / R mapping is responsible for generating SQL, you only need to care about the object.