.NET Database

Mastering Entity Framework in .NET 8: A Complete Journey into the Most Powerful ORM!

Entity Framework Core in .NET 8 from A to Z: ORM, CRUD, LINQ, One-To-Many relations and Scaffolding with Code First and Database First approaches.

Course description

Mastering Entity Framework Core in .NET 8: The ORM That Changes How You Work with Databases

Entity Framework Core is the tool that lets you work with databases in C# without writing a single line of raw SQL. You know it by name, maybe you already use it in some project — but truly mastering it, understanding relationships, optimized LINQ queries and migrations, is another level. In this series I take you from installation to full One-To-Many relationship management, with a practical lesson-by-lesson approach.

What You'll Learn

  • The concept of ORM and how Scaffolding works with the Database First approach
  • Install the necessary NuGet packages and configure the DbContext
  • Save objects to the database with Insert through EF Core
  • Retrieve entities with Single and FirstOrDefault in LINQ
  • Handle lists with FindAll, IEnumerable and IList
  • Search records with Where, Like and EF.Functions
  • Delete and update elements in the database with EF Core
  • Implement One-To-Many relationships with Scaffolding
  • Insert objects respecting parent-child relationships
  • Retrieve related objects using LINQ Include (eager loading)

From CRUD to Relationships, Without Skipping the Fundamentals

The most common mistake with EF Core is using it without understanding what it generates under the hood. Every lesson shows you what really happens — when it makes a single query, when it makes more than one, when to use Find vs FirstOrDefault. We build understanding progressively, so when you get to relationships you already have the right foundations to reason about them without confusion.

Who This Course Is For

Ideal for C# developers who know the language basics and want to work with databases professionally using EF Core. Also useful for those who have already used EF but want to systematize their knowledge and better understand design choices.

Lessons list

I'll explain what an ORM is and why Entity Framework Core dramatically simplifies database work in .NET. Let's explore the Scaffolding concept with the Database First approach, which auto-generates C# classes from an existing database.

Guarda lezione

I'll show you how to install the required NuGet packages for Entity Framework Core and how to run the Scaffolding command to generate the DbContext and entity classes. Let's look at the generated code structure and how to configure it correctly.

Guarda lezione

Let's see how to save a new object to the database using Entity Framework Core, with the DbContext handling the Insert transparently. I'll show you the Add and SaveChanges cycle and what actually happens at the SQL level under the hood.

Guarda lezione

I'll explain the difference between Single and FirstOrDefault in LINQ for retrieving a single entity from the database with Entity Framework Core, covering when to use each and how to handle cases where the record might not exist.

Guarda lezione

Let's retrieve lists of entities from the database using FindAll in Entity Framework Core, and explore the practical difference between IEnumerable and IList in collection management — and how these types affect query execution and memory usage.

Guarda lezione

I'll show you how to filter database records in Entity Framework Core using Where for exact conditions and EF.Functions.Like for partial text searches. Let's write expressive LINQ queries that EF translates into optimized SQL.

Guarda lezione

Let's explore how to delete an entity from the database with Entity Framework Core, comparing the available approaches. I'll explain when to use Remove directly on the tracked entity and how to verify the deletion is correctly propagated.

Guarda lezione

I'll show you how to update an existing entity in the database with Entity Framework Core by modifying properties and saving changes with SaveChanges. Let's see how EF's change tracking automatically detects modifications without requiring explicit UPDATE statements.

Guarda lezione

I'll explain how to implement a One-To-Many relationship in Entity Framework Core using Scaffolding to auto-generate classes and navigation properties. Let's see how EF represents the parent-child entity relationship in the C# model.

Guarda lezione

Let's see how to insert objects into the database while respecting a One-To-Many relationship, correctly assigning the parent entity before saving the child. I'll show how Entity Framework manages the foreign key automatically when the relationship is properly configured.

Guarda lezione

I'll explain how to retrieve entities with their One-To-Many relationships using LINQ's Include, which activates eager loading and fetches related entities in a single query. Let's compare this to lazy loading and understand when to use Include to avoid the N+1 problem.

Guarda lezione
Giovanni Pace

Giovanni Pace

Ingegnere Informatico · Pratola Peligna

  • 107 Courses
About the teacher

Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.

This course includes

  • Lessons 11
  • Duration 1h 30m
  • Difficulty intermedio
  • Language it
  • Certificate No

Recently viewed