Learn about handling DbUpdate exceptions at the DAL and business layers.
- [Narrator] Having seen the DB update exception…in the last chapter, it deserves a little more…thought in the architecture.…It is not desirable for them to bubble…all the way up to the UI, and often,…it can be valuable to contain them within the data layer.…One of the advantages to isolating the EF context…to the data layer is the ability to handle…data-level exceptions within the DAL.…Database access errors can be isolated…from the shared code by using custom application exceptions…after handling the DB exceptions in a way that…makes sense for the data layer.…
Perhaps something like emailing the database administrator…directly so that the issue can be handled quickly.…The business layer would handle the application exception…as part of the business logic.…For an example of this, we'll start in the…Tracking Repository in the DAL.…Since database update exceptions can only happen…when the database is updated we can add error handling logic…in the SaveChanges method at the bottom.…We'll add try and catch DBUpdateException.…
- What is good application architecture?
- Real-world software and the SDLC
- Common knowledge and maintenance
- Choosing an architecture
- Design patterns with EF
- Debugging and error handling
- Architecture for the web with ASP.NET
- Designing for unit testing
- Strategies for dealing with common performance issues
Skill Level Advanced
Deploying ASP.NET Core Applications (2017)with Nate Barbettini57m 57s Intermediate
Microsoft SQL Server 2016 Essential Trainingwith Martin Guidry3h 18m Intermediate
1. Why Do All of This Architecture?
2. Design Patterns with EF
3. Error Handling
4. Architecture for the Web with ASP.NET
5. Designing for Unit Testing
6. Entity Framework Mistakes
- 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.