Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Introduction to Entity Framework Core 6
Highest Rated
Rating: 4.7 out of 5(394 ratings)
1,996 students

Introduction to Entity Framework Core 6

Learn Entity Framework Core from scratch
Created byFelipe Gavilán
Last updated 1/2023
English

What you'll learn

  • You are going to be able to develop .NET apps that use Entity Framework Core
  • Read, update, insert and delete data using Entity Framework Core
  • Create databases from C# code
  • Model relationships using conventions, data annotations and the fluent API
  • Do automatic tests that involves Entity Framework Core
  • Use the latest features of Entity Framework Core

Course content

11 sections170 lectures13h 10m total length
  • Introduction1:06

    Explore what Entity Framework Core is for, its evolution, and code first and database first approaches, including when to use them and how to configure in console and split apps.

  • What is Entity Framework Core?2:36

    Learn how Entity Framework Core, the object-relational mapper, lets you represent database tables as objects and work with SQL Server, SQLite, PostgreSQL, MySQL, and Oracle without writing SQL.

  • Versions2:06

    Explain the annual November release cycle for Entity Framework Core, noting EF Core 6 (November 2021) and 7 (November 2022), with LTE three-year and non LTE two-year support.

  • Code First - Database First3:41

    Explore code first and database first approaches in entity framework core 6, enabling database creation from code or generating the necessary entities and classes to work with an existing database.

  • When to use EF Core?3:38

    Assess when to use entity framework core, balancing productivity, speed improvements up to 90%, cross-platform support, and compatibility with SQL Server, PostgreSQL, MySQL, Oracle.

  • When NOT to use EF Core?2:42

    Identify when not to use EF Core six: framework four eight unsupported, databases, bulk scenarios where raw queries outperform EF Core; benchmark and consider Dapper or ADO.NET as alternatives.

  • EF Core vs Dapper2:37

    Explore the trade-offs between EF Core 6 and Dapper, showing how a micro-ORM maps query results to C# objects and how compile models and optimizations boost speed and reduce memory.

  • Installing the EF Core CLI2:02

    Install EF Core CLI to run migrations and generate entities from an existing database. Explore installation steps, updating to the latest version, and using the CLI in Windows.

  • Configuring EF Core in a Console App15:35

    Configure EF Core in a console app by creating a DbContext and entities, wiring a connection string, installing packages, and applying migrations.

  • Configuring EF Core in ASP.NET Core6:37

    Learn to configure EF Core in an ASP.NET Core app by adding a DbContext, injecting it, and using a connection string from appsettings.json to connect to SQL Server.

  • Summary2:17

    Explore Entity Framework Core 6 for cross-platform data access across Windows, Linux, and macOS, using code-first and database-first approaches to generate and synchronize databases with diverse engines.

  • Source code

Requirements

  • Basic C# level. Know how to work with variables, functions, classes and LINQ
  • Not much T-SQL knowledge is needed, though it helps to know basic concepts, like databases and tables

Description

In this course you will learn how to use Entity Framework Core 6 to talk to a database from C# code.

- We will learn to create databases from our C# code using the code-first technique.

- We will make a brief comparison with Dapper, to see what is the difference between each of these tools.

- We will see how to read, update, delete, and create data using Entity Framework Core.

- We will learn to work with relationships between our tables: One-to-many relationships, one-to-one relationships, and many-to-many relationships.

- We will use the Fluent API to configure the schema of our database.

- We will see how to use automatic tests in our Entity Framework Core projects.

- We will learn about the new features that Entity Framework Core 6 brings us.

- We will use functions such as Sum, Average and GroupBy, to perform operations on different records of a table.

- We will see how to execute stored procedures using Entity Framework Core.

- We will load the related data of our entities in different ways, using eager loading, explicit loading, select loading and lazy loading.

- We will learn that with deferred execution we can use interesting techniques to make our code more flexible and reusable.

- We will see techniques on how to correctly configure Entity Framework Core in ASP.NET Core, for example, we will see when we should use a pool to recycle the DbContext.

Who this course is for:

  • Beginner or advanced .NET developer who wants to learn Entity Framework Core from scratch
  • Beginner or advanced .NET developer who wants to stay up to date with Entity Framework Core features