Skip to content

Commit 56827ce

Browse files
committed
Update DbExceptionClassifier README and Sqlite dependency
1 parent 08323c3 commit 56827ce

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

DbExceptionClassifier/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,16 @@ Classify ADO.NET database exceptions by error type. Works with any ADO.NET provi
66

77
Supports **PostgreSQL**, **SQL Server**, **SQLite**, **Oracle**, **MySQL** (MySql.Data and MySqlConnector).
88

9-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square&logo=Apache)](License.md)
9+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square&logo=Apache)](../License.md)
1010
[![Target](https://img.shields.io/static/v1?label=target&message=net10.0&color=512bd4&logo=.net&style=flat-square)](https://dotnet.microsoft.com/en-us/)
1111

12+
[![](https://img.shields.io/nuget/dt/DbExceptionClassifier.SqlServer.svg?label=DbExceptionClassifier.SqlServer&style=flat-square&logo=Microsoft-Sql-Server)](https://www.nuget.org/packages/DbExceptionClassifier.SqlServer/)
13+
[![](https://img.shields.io/nuget/dt/DbExceptionClassifier.PostgreSQL.svg?label=DbExceptionClassifier.PostgreSQL&style=flat-square&logo=PostgreSQL)](https://www.nuget.org/packages/DbExceptionClassifier.PostgreSQL/)
14+
[![](https://img.shields.io/nuget/dt/DbExceptionClassifier.MySQL.svg?label=DbExceptionClassifier.MySQL&style=flat-square&logo=MySQL&logoColor=white)](https://www.nuget.org/packages/DbExceptionClassifier.MySQL/)
15+
[![](https://img.shields.io/nuget/dt/DbExceptionClassifier.MySQL.Pomelo.svg?label=DbExceptionClassifier.MySQL.Pomelo&style=flat-square&logo=MySQL&logoColor=white)](https://www.nuget.org/packages/DbExceptionClassifier.MySQL.Pomelo/)
16+
[![](https://img.shields.io/nuget/dt/DbExceptionClassifier.Sqlite.Core.svg?label=DbExceptionClassifier.Sqlite.Core&style=flat-square&logo=Sqlite)](https://www.nuget.org/packages/DbExceptionClassifier.Sqlite.Core/)
17+
[![](https://img.shields.io/nuget/dt/DbExceptionClassifier.Oracle.svg?label=DbExceptionClassifier.Oracle&style=flat-square&logo=Oracle)](https://www.nuget.org/packages/DbExceptionClassifier.Oracle/)
18+
1219
## What does DbExceptionClassifier do?
1320

1421
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.
@@ -35,7 +42,7 @@ dotnet add package DbExceptionClassifier.SqlServer
3542
```
3643

3744
```
38-
dotnet add package DbExceptionClassifier.Sqlite.Core
45+
dotnet add package DbExceptionClassifier.Sqlite
3946
```
4047

4148
```
@@ -106,6 +113,9 @@ catch (DbException ex) when (classifier.IsUniqueConstraintError(ex))
106113
}
107114
```
108115

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+
109119
## Entity Framework Core
110120

111121
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`.

EntityFramework.Exceptions/Sqlite/Sqlite.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
<Description>$(Description)$([System.Environment]::NewLine)$([System.Environment]::NewLine)$(NoNativeText)</Description>
1515
</PropertyGroup>
1616

17-
<ItemGroup Condition="'$(BuildType)' == 'Full' ">
18-
<PackageReference Include="Microsoft.Data.SQLite" Version="10.0.5" />
19-
</ItemGroup>
20-
2117
<ItemGroup>
2218
<ProjectReference Include="..\..\DbExceptionClassifier\Sqlite\Sqlite.csproj" />
2319
</ItemGroup>

0 commit comments

Comments
 (0)