English
Topic 8. Object-relational mapping with Entity Framework Core
Goal: become familiar with the principles of object-relational mapping and the Entity Framework Core library; learn to describe a data model with conventions, annotations, and the Fluent API, and to create and apply migrations to a PostgreSQL database; master LINQ to Entities queries with projections, grouping, and pagination, loading related data, change tracking, transactions, and using the context in a Windows Forms application.
Lecture contents
- The data context and model — ORM and Entity Framework Core · Installation and the data context · The model: conventions, annotations, and the Fluent API · Relationships between entities
- Migrations and LINQ queries — Migrations · LINQ to Entities queries
- Related data and change tracking — Loading related data · Change tracking
- Transactions, raw SQL, and testing — Transactions and concurrency · Raw SQL, context lifetime, and testing
- Common mistakes — Common mistakes