An object-relational mapper (ORM) lets an application manipulate database data through object-oriented concepts. It maps entity classes to tables, properties to columns, and object instances to rows, while handling much of the database communication. section 12.1.1 section 12.6
An ORM reduces data-access plumbing. Instead of opening connections, writing SQL, converting values, and constructing objects manually, an application can provide a LINQ query and receive mapped POCO objects. It can also track changed properties and generate updates for the affected columns. section 12.1.2
An ORM typically provides:
- A high-level abstraction over relational databases that reduces the SQL and database knowledge needed for routine application work. section 12.1.2 section 12.6
- A provider model that supports databases such as SQL Server, SQLite, PostgreSQL, and MySQL without requiring object-manipulation code to change. section 12.1.1 section 12.6
- A model and schema workflow centered on DbContext, entity conventions, configuration, and migrations. section 12.6
Loading and updating a product
For an e-commerce product lookup, low-level database access requires a connection, SQL, data reading, value conversion, and manual object construction. An ORM instead accepts a LINQ query, maps the result to a product POCO, tracks property changes, and can issue an update for the changed database column. section 12.1.2
Use the mapping diagram to connect .NET classes and objects with database tables and rows. section 12.1.1






