Entity Framework Core Tutorial

In this Entity Framework Core tutorial series, you will gain proficiency in handling data within your .NET applications.

What you’ll learn in this tutorial series:

  • Build your first EF Core application.
  • Interact with EF core data model.
  • Control database creation and schema changes via migrations.
  • Logging SQL and EF Core actions.
  • Work with relationships like one-to-one, one-to-many, and many-to-many.
  • Work with raw SQL, views, stored procedures, and other database objects.
  • Test EF core application.

Section 1. Getting Started with Entity Framework Core

This section helps you get started with EF Core by understanding what EF core is, how to start a new .NET app that uses EF Core, how to create a data model and DB connection, and how to perform a simple CRUD via EF Core’s API.

Section 2. EF Core Relationships

This section teaches you to understand the representation of relationships in object models and relational database and explain to you how EF Core maps between the two.

  • One-to-many relationships – show you how a single entity associates with zero or more entities.
  • One-to-one relationships – learn how to associate an entity with another entity using a one-to-one relationship.
  • Many-to-many relationships – guide you on how to use a many-to-many relationship to associate any number of entities of an entity type with any number of other entities of another entity type.

Section 3. Querying data using LINQ from Entity Framework Core

This section guides you on how to query data from one or more database tables using both EF Core and LINQ methods:

  • EF Core Sample Project – download an EF Core Sample Project to create a database and populate data for learning the query.
  • Select – show you how to select one or more columns using the LINQ Select() method.
  • Order By – learn how to sort data using the LINQ OrderBy(), ThenBy(), OrderByDescending(), and ThenByDescending() methods.
  • Where() – learn how to filter data using the LINQ Where() method and how to use the AND and OR operator to combine multiple conditions in the Where() method.
  • IN – check if a value matches a list of values using LINQ Contains() method.
  • LIKE – guide you on how to query data based on pattern matching using the LIKE operator
  • Inner join – show you how to use the Include() method to form a query that uses join to get data from two or more tables.
  • Group By – learn how to group rows into groups and apply an aggregate function to each group.

Section 4. Modifying Data

This section teaches you to create, read, update, and delete entities in EF Core. These operations are known as CRUD:

  • Insert – learn how to insert entities into database tables.
  • Update – show you various ways to update data in database tables.
  • Delete – guide you on how to delete data from the database tables.

Section 5. Working with Stored Procedures, Views, and Raw SQL

This section shows you how to work with stored procedures and views in EF Core.

Was this tutorial helpful ?