diff --git a/STX.EFxceptions.PostgreSQL/EFxceptionsContext.cs b/STX.EFxceptions.PostgreSQL/EFxceptionsContext.cs new file mode 100644 index 0000000..9451df0 --- /dev/null +++ b/STX.EFxceptions.PostgreSQL/EFxceptionsContext.cs @@ -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 + { + public EFxceptionsContext(DbContextOptions options) + : base(options) + { } + + protected EFxceptionsContext() + : base() + { } + + protected override IDbErrorBroker CreateErrorBroker() => + new PostgreSqlErrorBroker(); + + protected override IEFxceptionService CreateEFxceptionService( + IDbErrorBroker errorBroker) + { + return new PostgreSqlEFxceptionService(errorBroker); + } + } +} diff --git a/STX.EFxceptions.PostgreSQL/STX.EFxceptions.PostgreSQL.csproj b/STX.EFxceptions.PostgreSQL/STX.EFxceptions.PostgreSQL.csproj index e728094..e901db2 100644 --- a/STX.EFxceptions.PostgreSQL/STX.EFxceptions.PostgreSQL.csproj +++ b/STX.EFxceptions.PostgreSQL/STX.EFxceptions.PostgreSQL.csproj @@ -44,6 +44,12 @@ + + + + + +