Connection resiliency is the ability to automatically retry certain transient errors when attempting to connect to the database. Entity Framework Core achieves this through execution strategies. In this section, Phil explains connection resiliency, demonstrates the default execution strategy for SQL Server, and then creates a custom execution strategy.
- [Instructor] Connection resiliency allows…for automatically retrying…certain failed database commands.…These are non-fatal exceptions that are usually due…to some sort of glitch in the internet connection.…And connection resiliency…is implemented with execution strategies,…and these encapsulate the logic for failure…detection and retry.…When the retry limit is exceeded,…NET framework will throw a retry limit exceeded exception.…
SQL Server provides out-of-the-box execution strategy…for SQL server and SQL Azure,…with one step configuration.…And is also customizable for a number…of retries, retry delay,…and you can include additional triggering exceptions.…You can also create a custom execution strategy,…on your own.…To create a custom execution strategy,…you create a class that inherits from execution strategy,…you implement the should retry on method,…and you return true…for exceptions that are candidates for retry.…
It will automatically stop retrying…when the limit is reached.…And then you add that to the DB context configuration,…
- 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.