Typed Exceptions for Entity Framework Core

Abstract

When using Entity Framework Core for data access all database exceptions are wrapped in DbUpdateException. If you need to know whether the exception was caused by a unique constraint, the value being too long, or the value missing for a required column, you need to dig into the concrete DbException subclass instance and check the error number to determine the exact cause. In this episode, learn how EntityFramework.Exceptions handles all the database-specific details and allows you to use typed exceptions for Entity Framework Core when your query violates database constraints.

Date
Feb 10, 2021 10:00 PM
Avatar
Giorgi Dalakishvili
World-Class Software Engineer

Related