Applications seldom use data from just one table at a time. Entity Framework Core supports loading related data through Eager and Explicit loading. In this section, Phil shows using the Include and ThenInclude commands to load related data in your LINQ query. Then, Phil shows how to load related data explicitly with the Reference and Collection commands.
- [Instructor] So far, all the queries we've written…for this course have only dealt with one table at a time,…and that's not a realistic scenario.…Real applications need to get data from multiple tables,…and it's best to do it in one query…so you're not overloading the server, being too chatty.…EF Core and EF 6 have always supported loading related data.…EF 6 has three ways,…eager, explicit, and lazy.…
EF Core only has two, so let's talk about them.…Eager loading loads related data…as part of the initial query.…This is the same as doing a join in T-SQL.…Explicit loading loads related data at a later time.…This is a developer saying, all right,…I have my product.…Now I want to pull out the product model.…This is for scenarios where initially…you don't know if you need this extra data,…so you don't want to bring back too much,…and then you find out that you do need the initial data,…so you go get those related objects.…
Lazy loading loads related data transparently…when the navigation property is accessed.…This is not yet supported in EF Core,…
- Entity Framework Core components and projects
- Working with scaffolded files
- Testing with xUnit
- Viewing generated SQL
- Composing queries
- Sorting and filtering results
- Working with aggregates
- Loading related data
- Logging and tracking
- Mapping functions
- Generics and delegates
- Checking concurrency
- Resiliency and transactions
Skill Level Intermediate
Learning Entity Framework Corewith Reynald Adolphe1h 35m Intermediate
1. Get to Know Entity Framework
2. Set the Stage
3. Querying Data: Part 1
4. Querying Data: Part 2
5. Advanced Query Features
6. Persisting Data
7. DbContext Options and Configuration
Thank you1m 23s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.