Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions STX.EFxceptions.PostgreSQL/EFxceptionsContext.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

// ----------------------------------------------------------------------------------
// Copyright(c) The Standard Organization: A coalition of the Good-Hearted Engineers
// ----------------------------------------------------------------------------------

using Microsoft.EntityFrameworkCore;
using Npgsql;
using STX.EFxceptions.Abstractions.Brokers.DbErrorBroker;
using STX.EFxceptions.Abstractions.Services.EFxceptions;
using STX.EFxceptions.Core;
using STX.EFxceptions.PostgreSQL.Base.Brokers.DbErrorBroker;
using STX.EFxceptions.PostgreSQL.Base.Services.Foundations;

namespace STX.EFxceptions.PostgreSQL
{
public abstract class EFxceptionsContext : DbContextBase<NpgsqlException, string>
{
public EFxceptionsContext(DbContextOptions<EFxceptionsContext> options)
: base(options)
{ }

protected EFxceptionsContext()
: base()
{ }

protected override IDbErrorBroker<NpgsqlException, string> CreateErrorBroker() =>
new PostgreSqlErrorBroker();

protected override IEFxceptionService CreateEFxceptionService(
IDbErrorBroker<NpgsqlException, string> errorBroker)
{
return new PostgreSqlEFxceptionService(errorBroker);
}
}
}
6 changes: 6 additions & 0 deletions STX.EFxceptions.PostgreSQL/STX.EFxceptions.PostgreSQL.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.11" />
<PackageReference Include="STX.EFxceptions.Core" Version="0.1.7" />
<PackageReference Include="STX.EFxceptions.Abstractions" Version="0.1.7" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\STX.EFxceptions.PostgreSQL.Base\STX.EFxceptions.PostgreSQL.Base.csproj" />
</ItemGroup>
Expand Down
Loading