Entity Framework Core introduced batched updates—in addition to transaction support. This change in how updates are sent to the server significantly improves performance and potentially reduces the cost per transaction. Phil demonstrates the batching process, how to change the batch size, and the effect of changing the max batch size.
- [Instructor] In EF 6…when there was a series of updates to be made,…they were wrapped in an implicit transaction,…but the calls were made one at a time to the database.…EF Core sends all of the updates in one or more batches.…This greatly increases performances and reduces chattiness.…So for example, if you're using SQL Azure…and you're getting charged per transaction…and you have 100 saves…and those are done in 100 separate calls,…it's going to be a very different model…than if you had, let's say a batch of 100 go in one call.…
The batch size is configurable.…So if you find that you need to change it,…you are capable of doing so.…However the default batch size…is determined by the database provider at runtime…based on a variety of factors.…We'll demonstrate batching by first using…a default batch configuration…and then modifying the batch configuration…and see how it changes the results.…So in this first test we should batch statements…when sending to SQL server.…
We are going to once again use a transaction,…
- 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.