You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with ADO.NET, database exceptions are provider-specific. To determine whether an error was caused by a unique constraint violation, a foreign key violation, or a null constraint, you need to inspect the provider-specific exception type and error codes.
@@ -106,6 +113,9 @@ catch (DbException ex) when (classifier.IsUniqueConstraintError(ex))
106
113
}
107
114
```
108
115
116
+
> [!TIP]
117
+
> If you want to use another native SQLite binary instead of `e_sqlite3.dll` use the [DbExceptionClassifier.Sqlite.Core](https://www.nuget.org/packages/DbExceptionClassifier.Sqlite.Core) package. This package depends on `Microsoft.Data.Sqlite.Core`, which doesn't include the native SQLite binary so you can use any native binary you want.
118
+
109
119
## Entity Framework Core
110
120
111
121
If you are using Entity Framework Core, use the [EntityFrameworkCore.Exceptions](https://github.com/Giorgi/EntityFramework.Exceptions) packages instead. They build on top of DbExceptionClassifier and provide typed exceptions that inherit from `DbUpdateException`.
0 commit comments