Databases & Data
Learn Entity Framework Core
Entity Framework Core maps your C# classes to database tables, so you can work with objects in code while it generates the SQL underneath.
Why teams use it
- It removes a large amount of repetitive data-access code.
- Migrations keep the database schema in step with your code, under version control.
- Queries stay type-checked, so renaming a property does not silently break a query string.
Where you will meet it
Saving a new order along with its line items in a single transaction is a few lines with EF Core, where hand-written SQL would need considerably more plumbing.
What to learn, and in what order
Work through these roughly in order. Jumping to the advanced list before the basics are solid is the most common way people get stuck.
Beginner
- What an ORM is
- DbContext and entities
- Reading and saving data
- Creating your first migration
Intermediate
- Relationships and navigation properties
- Eager, lazy and explicit loading
- Projection to DTOs
- Change tracking and no-tracking queries
- Transactions
Advanced
- The N+1 query problem
- Raw SQL and stored procedures
- Concurrency handling
- Query performance and indexing
Have a project worth talking through?
Tell us what you're building or what's slowing your current system down. We'll give you a direct read on scope and approach.