In this episode, Robert is joined by Phil Japikse for part 1 of a 10 part series on Entity Framework Core. This series is a follow-up to the 5 part series that was aimed at folks new to EF Core and provides a more in-depth exploration of a number of topics.

Find the sample code here.

Episode list:

  • Part 1: Performance. (this episode)
  • Part 2: View Models. Phil covers using straight SQL, stored procedures, and populating view models with projections.
  • Part 3: Configuration. EF Core provides a wide range of configuration options for the derived DbContext and it’s full support of dependency injection.
  • Part 4: Build Your Model. This show is all about creating your EF Core entities to shape the database and using migrations to publish the model.
  • Part 5: Global Query Filters. These are new in EF Core, and provide a great mechanism for handling scenarios like multi-tenancy and soft deletes.
  • Part 6: Concurrency Conflicts. These have long been a problem for multi-user systems. Phil walks us through how concurrency checking works with EF Core and SQL Server, and all of the data provided back to the developer when a concurrency issue occurs.
  • Part 7: Connection Resiliency. EF Core can gracefully handles transient database errors (if you enable the feature). Phil and Robert talk about what transient errors are, how to enable the feature, and how it effects using explicit permissions.
  • Part 8: Computed Columns. Blending EF Core with server side functionality is a breeze with EF Core. Phil covers using computed columns in EF Core as well as mapping SQL Server function to C# functions for use in LINQ queries.
  • Part 9: Change Tracking Events. The fairly recent addition of Tracking and State Change events provides a mechanism for audit logging (among other uses). Phil shows how this works as well as takes a quick spin through the EF Core Interceptors.
  • Part 10: Field Mapping. This enables EF Core to create your entities without calling the property setters, solving the long running problem of using an ORM with frameworks that use INotifyPropertyChanged, such as Windows Presentation Foundation (WPF).

In this video, Robert is joined by Phil Japikse for part 3 of a 5 part series on Entity Framework Core. Aimed at folks new to EF Core, Phil shows how to start with an existing SQL Server database, create entities/objects for each table and then how to perform basic CRUD operations on the data.

This episode covers querying data using EF Core. We discuss the basics of Where clauses, retrieving single items or lists of items, as well as when queries actually execute.

Find the sample code here.

Episode list:

  • Part 1: Working with Existing Databases. We scaffold the DbContext and the Entities from the Northwind Database, discuss navigation properties and relationships.
  • Part 2: Change Tracking. Change Tracking is one of the most compelling reasons to use an object-relational-mapper (ORM) like EF Core. In this episode we discuss how the change tracker works, see it in action, as well as load data outside of the change tracker.
  • Part 3: Basic Queries (this episode).
  • Part 4: Querying Related Data and Using Projections (coming soon). Querying related data is simple in EF Core. In this episode we demonstrate creating joins in our LINQ queries with Include and ThenInclude. We also discuss how you use projections to shape the queried data into other objects, anonymous or strongly typed.
  • Part 5: Putting the CUD into CRUD (coming soon). Wrapping up our starter series on EF Core, this episode covers adding, updating, and deleting data.