• Courses
  • TutorialsFree
  • Learning Paths
  • Blogs
  • Authors
  • Dometrain Pro
  • Shopping Basket

    Your basket is empty

  • Business Portal
  • From Zero to Hero: Entity Framework Core in .NET

    Learn how to use Entity Framework Core in your .NET applications

    About This Course

    Entity Framework (EF) Core is a lightweight, extensible, open source and cross-platform object-relational mapper or ORM which enables .NET developers to work with a database using .NET objects and eliminates the need for most of the data-access code that typically needs to be written. Alongside Dapper, it is one of the two most popular ORMs in .NET, and given how much its performance has been improved in the last few .NET versions, it is an excellent choice for any .NET application. In this 8-and-a-half-hour-long course, Hannes Lowette will cover everything you need to know about Entity Framework Core, from its most basic concepts to its most advanced ones, including testing and different database providers. This course is effectively two courses bundled as one, and it is the best resource you could have to learn Entity Framework code in .NET with C#.

    Course Curriculum

    8h 33m 12 sections
    Welcome
    0:34 Free preview
    What will you learn in this course?
    1:13 Free preview
    Who is the course for?
    1:25 Free preview
    What is an ORM?
    3:23
    Where are ORMs useful?
    2:29
    What is EF Core?
    6:07
    Introducing: the database context
    2:05
    How does a DbContext work?
    2:25
    Section recap
    0:36
    The application we will build the data access for
    6:32
    Creating our first EFCore Model
    4:07
    Getting the Model to work in our application
    10:59
    Implementing data manipulation operations
    17:43
    Implementing query behavior
    8:15
    Seeing what goes on in the Database
    4:08
    Projecting data to optimize queries
    4:04
    Section recap
    0:54
    Taking a look at the DB schema
    2:34
    Introducing DataAnnotations for our Model
    4:49
    Achieving similar results with FluentAPI
    9:42
    One-to-many relationships between entities
    14:22
    Converting between different data types
    12:08
    Using owned and complex types to group data
    10:03
    Generating values in the model
    9:00
    Hiding some database fields from our model
    2:39
    Applying global query filters
    3:28
    Section recap
    1:08
    Why do we need migrations?
    2:50
    The 2 migration philosophies
    6:00
    Adding our first migration
    8:47
    Adding migrations after changing the model
    7:15
    Executing Migrations from the CLI
    5:23
    Dealing with an out-of-sync model
    8:42
    The proper way to execute migrations
    6:38
    Section recap
    0:41
    What are the challenges in tests with ORMs?
    4:59
    Using Test databases
    5:17
    Using a database in memory
    13:29
    Faking DbSets in unit tests
    10:10
    The repository pattern
    8:49
    Integration testing with EF Core
    4:26
    Section recap
    3:33
    Introduction
    0:53
    Dependency Injection
    8:23
    Configuring Logging
    10:06
    DbContext Lifecycle
    7:47
    More on repositories
    17:06
    Different multi-tenant approaches
    4:00
    Multi-tenant with discriminators
    9:35
    Multi-tenant with separate databases
    4:59
    My take on architecture
    4:47
    Section recap
    0:52
    More DbContext features?
    1:27
    Using inheritance in your model
    27:26
    Using Alternate keys
    5:37
    One-to-one relationships
    5:39
    Many-to-many relationships
    9:31
    Using compound keys
    3:14
    Using raw SQL queries for your entities
    7:36
    Using keyless entities to query your database
    5:31
    Using the ChangeTracker for fun & profit
    12:56
    Section recap
    1:20
    The typical types of performance issues
    4:19
    Slow Queries & DB indices
    7:58
    Using compiled queries to improve runtime performance
    7:00
    Using batching to execute bulk queries
    8:38
    Loading related data - strategies
    15:40
    Untracked query results
    3:23
    Solving Concurrency Issues
    10:58
    Section recap
    1:08
    When the DB already exists
    0:26
    Using the DB to generate a model
    9:43
    How can we further evolve the model?
    5:57
    Regenerating every time: a demo
    4:54
    Keeping in sync manually: a demo
    4:59
    Section recap
    0:07
    EF Core isn't just for SQL server
    0:59
    Using another RDBMS's with EFCore
    10:18
    What is CosmosDB?
    6:36
    Switching our system to CosmosDB
    15:30
    Section recap
    1:09
    Conclusion
    0:44

    Meet Your Instructor

    Hannes Lowette

    Hannes Lowette

    With 20 years in .NET development, Hannes has always been passionate about performance, databases, distributed systems and large-scale applications. When it comes to architecture, his opinions have become a bit more nuanced, and the "it depends" card, however boring, gets played in many technical discussions. Hannes has always had a passion for sharing knowledge. It doesn't matter whether it is one-to-one while pair programming, on a conference stage giving a talk or when he's helping people succeed in their careers as a coach. In his free time, when he's not building LEGO® castles with his three kids, he likes to stream his guitar building on Twitch and spends too much time playing online chess and doing all-around geeky stuff. You can always lure him into a chat over a glass of great Whisky.

    View all courses by Hannes Lowette

    What's New

    What's new in C# 14
    blog

    What's new in C# 14

    This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

    Learn More
    Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    course

    Let's Build It: AI Chatbot with RAG in .NET Using Your Data

    Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

    Learn More
    Working with Large Language Models
    tutorial

    Working with Large Language Models

    Learn how to work with Large Language Models (LLMs). Understand the fundamentals of how GPT works, the transformer architecture, and master prompt engineering techniques to build AI agents.

    Learn More
    From Zero to Hero: SignalR in .NET
    course

    From Zero to Hero: SignalR in .NET

    Enable enterprise-grade real-time communication for your web apps with SignalR.

    Learn More
    Deep Dive: Solution Architecture
    course

    Deep Dive: Solution Architecture

    Master solution architecture and turn business needs into scalable, maintainable systems.

    Learn More
    Migrating: ASP.NET Web APIs to ASP.NET Core
    course

    Migrating: ASP.NET Web APIs to ASP.NET Core

    A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

    Learn More
    Getting Started: Caching in .NET
    course

    Getting Started: Caching in .NET

    Let's make the hardest thing in programming easy for .NET software engineers.

    Learn More
    From Zero to Hero: Testing with xUnit in C#
    course

    From Zero to Hero: Testing with xUnit in C#

    Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

    Learn More
    Create a ChatGPT Console AI Chatbot in C#
    blog

    Create a ChatGPT Console AI Chatbot in C#

    This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

    Learn More