Originally excluded from Entity Framework Core, the Find method operates differently than a standard Where clause. In this section, Phil demonstrates the Find method.
- [Instructor] The Find clause was a popular feature in EF6…that was not originally ported to EF Core.…Largely based on feedback from the community,…the F Core team did implement Find in EF Core 1.1.…The difference between Find and other WHERE clauses is the…Find only works with an entity's primary key or key values…in the situation where there's a complex key.…And if the entity is already being tracked,…in other words, if it's already been looked up…and we'll talk a lot more about tracking…later in this course, the instance that's already retrieved…is returned and no database call is made.…
If there is not an existing entity with that primary key…already in the DB context,…then the data store will be queried for data.…And if that query doesn't find anything,…it simply returns a null.…So let's see how this works.…So once again I have another set of test files…for you to start with.…And to be clear, these aren't unit tests.…You would probably call them integration tests.…I'll just call them tests.…Same setup as before.…
- 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.