From 5827b86bdd2ad4a1e92c5d7d05d71fb10534b29e Mon Sep 17 00:00:00 2001 From: "Eric Sibly [chullybun]" Date: Mon, 25 Mar 2024 16:53:39 -0700 Subject: [PATCH] v2.5.1 (#52) --- CHANGELOG.md | 4 ++++ Common.targets | 2 +- src/DbEx.MySql/DbEx.MySql.csproj | 4 ++-- src/DbEx.Postgres/DbEx.Postgres.csproj | 2 +- src/DbEx.SqlServer/DbEx.SqlServer.csproj | 2 +- .../Templates/EventOutboxDequeue_cs.hbs | 13 ++++--------- .../Templates/EventOutboxEnqueue_cs.hbs | 11 +++-------- src/DbEx/DbEx.csproj | 4 ++-- .../DbEx.Test.OutboxConsole.csproj | 1 + .../Generated/EventOutboxDequeue.cs | 13 ++++--------- .../Generated/EventOutboxEnqueue.cs | 11 +++-------- tests/DbEx.Test/DbEx.Test.csproj | 2 +- 12 files changed, 27 insertions(+), 42 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9f8270..87ae67d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ Represents the **NuGet** versions. +## v2.5.1 +- *Fixed:* Updated `CoreEx` to version `3.15.0`. +- *Fixed* Simplify event outbox C# code-generation templates for primary constructor usage. + ## v2.5.0 - *Enhancement:* Added [PostgreSQL](https://www.postgresql.org/) database migrations support. - *Enhancement:* Added `DateOnly` and `TimeOnly` support (requires `net7.0`+) (see also `MigrationArgs.EmitDotNetDateOnly` and `MigrationArgs.EmitDotNetTimeOnly` to explicitly enable). diff --git a/Common.targets b/Common.targets index cdbd139..a0bc043 100644 --- a/Common.targets +++ b/Common.targets @@ -1,6 +1,6 @@ - 2.5.0 + 2.5.1 preview Avanade Avanade diff --git a/src/DbEx.MySql/DbEx.MySql.csproj b/src/DbEx.MySql/DbEx.MySql.csproj index 91cbcdc..610385f 100644 --- a/src/DbEx.MySql/DbEx.MySql.csproj +++ b/src/DbEx.MySql/DbEx.MySql.csproj @@ -41,8 +41,8 @@ - - + + diff --git a/src/DbEx.Postgres/DbEx.Postgres.csproj b/src/DbEx.Postgres/DbEx.Postgres.csproj index 5109897..5644f2b 100644 --- a/src/DbEx.Postgres/DbEx.Postgres.csproj +++ b/src/DbEx.Postgres/DbEx.Postgres.csproj @@ -42,7 +42,7 @@ - + diff --git a/src/DbEx.SqlServer/DbEx.SqlServer.csproj b/src/DbEx.SqlServer/DbEx.SqlServer.csproj index db94ba0..d6265d0 100644 --- a/src/DbEx.SqlServer/DbEx.SqlServer.csproj +++ b/src/DbEx.SqlServer/DbEx.SqlServer.csproj @@ -32,7 +32,7 @@ - + diff --git a/src/DbEx.SqlServer/Templates/EventOutboxDequeue_cs.hbs b/src/DbEx.SqlServer/Templates/EventOutboxDequeue_cs.hbs index 9941845..148bdde 100644 --- a/src/DbEx.SqlServer/Templates/EventOutboxDequeue_cs.hbs +++ b/src/DbEx.SqlServer/Templates/EventOutboxDequeue_cs.hbs @@ -13,16 +13,11 @@ namespace {{NamespaceOutbox}}.Data; /// /// Provides the database outbox enqueue . /// -public sealed class EventOutboxDequeue : EventOutboxDequeueBase +/// The . +/// The . +/// The . +public sealed class EventOutboxDequeue(IDatabase database, IEventSender eventSender, ILogger logger) : EventOutboxDequeueBase(database, eventSender, logger) { - /// - /// Initializes a new instance of the class. - /// - /// The . - /// The . - /// The . - public EventOutboxDequeue(IDatabase database, IEventSender eventSender, ILogger logger) : base(database, eventSender, logger) { } - /// protected override string DequeueStoredProcedure => "[{{OutboxSchema}}].[{{OutboxDequeueStoredProcedure}}]"; }{{#if Root.PreprocessorDirectives}} diff --git a/src/DbEx.SqlServer/Templates/EventOutboxEnqueue_cs.hbs b/src/DbEx.SqlServer/Templates/EventOutboxEnqueue_cs.hbs index a582cdd..71c9faa 100644 --- a/src/DbEx.SqlServer/Templates/EventOutboxEnqueue_cs.hbs +++ b/src/DbEx.SqlServer/Templates/EventOutboxEnqueue_cs.hbs @@ -13,15 +13,10 @@ namespace {{NamespaceOutbox}}.Data; /// /// Provides the database outbox enqueue . /// -public sealed class EventOutboxEnqueue : EventOutboxEnqueueBase +/// The . +/// The . +public sealed class EventOutboxEnqueue(IDatabase database, ILogger logger) : EventOutboxEnqueueBase(database, logger) { - /// - /// Initializes a new instance of the class. - /// - /// The . - /// The . - public EventOutboxEnqueue(IDatabase database, ILogger logger) : base(database, logger) { } - /// protected override string DbTvpTypeName => "[{{OutboxSchema}}].[udt{{OutboxTable}}List]"; diff --git a/src/DbEx/DbEx.csproj b/src/DbEx/DbEx.csproj index 29e359a..b997d4f 100644 --- a/src/DbEx/DbEx.csproj +++ b/src/DbEx/DbEx.csproj @@ -20,8 +20,8 @@ - - + + diff --git a/tests/DbEx.Test.OutboxConsole/DbEx.Test.OutboxConsole.csproj b/tests/DbEx.Test.OutboxConsole/DbEx.Test.OutboxConsole.csproj index edd363d..41a5916 100644 --- a/tests/DbEx.Test.OutboxConsole/DbEx.Test.OutboxConsole.csproj +++ b/tests/DbEx.Test.OutboxConsole/DbEx.Test.OutboxConsole.csproj @@ -4,6 +4,7 @@ Exe net6.0 enable + preview diff --git a/tests/DbEx.Test.OutboxConsole/Generated/EventOutboxDequeue.cs b/tests/DbEx.Test.OutboxConsole/Generated/EventOutboxDequeue.cs index 1b9a2a7..836d7c4 100644 --- a/tests/DbEx.Test.OutboxConsole/Generated/EventOutboxDequeue.cs +++ b/tests/DbEx.Test.OutboxConsole/Generated/EventOutboxDequeue.cs @@ -7,16 +7,11 @@ namespace DbEx.Test.OutboxConsole.Data; /// /// Provides the database outbox enqueue . /// -public sealed class EventOutboxDequeue : EventOutboxDequeueBase +/// The . +/// The . +/// The . +public sealed class EventOutboxDequeue(IDatabase database, IEventSender eventSender, ILogger logger) : EventOutboxDequeueBase(database, eventSender, logger) { - /// - /// Initializes a new instance of the class. - /// - /// The . - /// The . - /// The . - public EventOutboxDequeue(IDatabase database, IEventSender eventSender, ILogger logger) : base(database, eventSender, logger) { } - /// protected override string DequeueStoredProcedure => "[Outbox].[spEventOutboxDequeue]"; } \ No newline at end of file diff --git a/tests/DbEx.Test.OutboxConsole/Generated/EventOutboxEnqueue.cs b/tests/DbEx.Test.OutboxConsole/Generated/EventOutboxEnqueue.cs index 27ede78..147056c 100644 --- a/tests/DbEx.Test.OutboxConsole/Generated/EventOutboxEnqueue.cs +++ b/tests/DbEx.Test.OutboxConsole/Generated/EventOutboxEnqueue.cs @@ -7,15 +7,10 @@ namespace DbEx.Test.OutboxConsole.Data; /// /// Provides the database outbox enqueue . /// -public sealed class EventOutboxEnqueue : EventOutboxEnqueueBase +/// The . +/// The . +public sealed class EventOutboxEnqueue(IDatabase database, ILogger logger) : EventOutboxEnqueueBase(database, logger) { - /// - /// Initializes a new instance of the class. - /// - /// The . - /// The . - public EventOutboxEnqueue(IDatabase database, ILogger logger) : base(database, logger) { } - /// protected override string DbTvpTypeName => "[Outbox].[udtEventOutboxList]"; diff --git a/tests/DbEx.Test/DbEx.Test.csproj b/tests/DbEx.Test/DbEx.Test.csproj index 6036970..226e114 100644 --- a/tests/DbEx.Test/DbEx.Test.csproj +++ b/tests/DbEx.Test/DbEx.Test.csproj @@ -14,7 +14,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive