diff --git a/CHANGELOG.md b/CHANGELOG.md
index cb44e9b..2653552 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
Represents the **NuGet** versions.
+## v2.5.2
+- *Fixed:* Updated `CoreEx` (`v3.15.0`) and other dependencies.
+- *Fixed:* Simplify event outbox C# code-generation templates for primary constructor usage.
+
## v2.5.1
- *Fixed:* Updated `CoreEx` (`v3.13.0`) and other dependencies.
diff --git a/Common.targets b/Common.targets
index cd1e54c..4e0e9be 100644
--- a/Common.targets
+++ b/Common.targets
@@ -1,6 +1,6 @@
- 2.5.1
+ 2.5.2
true
NTangle Developers
Avanade
diff --git a/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Database/ContactSync.NewApp.Database.csproj b/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Database/ContactSync.NewApp.Database.csproj
index 54dcdbc..06ba6fb 100644
--- a/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Database/ContactSync.NewApp.Database.csproj
+++ b/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Database/ContactSync.NewApp.Database.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Subscriber/ContactSync.NewApp.Subscriber.csproj b/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Subscriber/ContactSync.NewApp.Subscriber.csproj
index d955ea5..3470d51 100644
--- a/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Subscriber/ContactSync.NewApp.Subscriber.csproj
+++ b/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Subscriber/ContactSync.NewApp.Subscriber.csproj
@@ -26,11 +26,11 @@
PreserveNewest
-
-
-
+
+
+
-
+
diff --git a/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Database/ContactSync.OldApp.Database.csproj b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Database/ContactSync.OldApp.Database.csproj
index 99610e8..cf5a722 100644
--- a/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Database/ContactSync.OldApp.Database.csproj
+++ b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Database/ContactSync.OldApp.Database.csproj
@@ -13,7 +13,7 @@
-
+
\ No newline at end of file
diff --git a/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/ContactSync.OldApp.Publisher.csproj b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/ContactSync.OldApp.Publisher.csproj
index aaebd8d..d81c3be 100644
--- a/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/ContactSync.OldApp.Publisher.csproj
+++ b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/ContactSync.OldApp.Publisher.csproj
@@ -23,9 +23,9 @@
-
+
-
+
diff --git a/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/EventOutboxDequeue.cs b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/EventOutboxDequeue.cs
index 157d16f..f1e0dc8 100644
--- a/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/EventOutboxDequeue.cs
+++ b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/EventOutboxDequeue.cs
@@ -7,16 +7,11 @@ namespace ContactSync.OldApp.Publisher.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/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/EventOutboxEnqueue.cs b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/EventOutboxEnqueue.cs
index 637d347..005b5cb 100644
--- a/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/EventOutboxEnqueue.cs
+++ b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/EventOutboxEnqueue.cs
@@ -7,15 +7,10 @@ namespace ContactSync.OldApp.Publisher.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/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/VersionTrackingMapper.cs b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/VersionTrackingMapper.cs
index ced63e6..0057d28 100644
--- a/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/VersionTrackingMapper.cs
+++ b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Data/Generated/VersionTrackingMapper.cs
@@ -7,10 +7,4 @@ namespace ContactSync.OldApp.Publisher.Data;
///
/// Provides the database mapper for table '[NTangle].[VersionTracking]'.
///
-public class VersionTrackingMapper : VersionTrackingMapperBase
-{
- ///
- /// Initializes a new instance of the class.
- ///
- public VersionTrackingMapper() : base("[NTangle].[udtVersionTrackingList]") { }
-}
\ No newline at end of file
+public class VersionTrackingMapper() : VersionTrackingMapperBase("[NTangle].[udtVersionTrackingList]") { }
\ No newline at end of file
diff --git a/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Services/Generated/ContactService.cs b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Services/Generated/ContactService.cs
index 91bf9cb..cc89e35 100644
--- a/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Services/Generated/ContactService.cs
+++ b/samples/ContactSync/ContactSync.OldApp/ContactSync.OldApp.Publisher/Services/Generated/ContactService.cs
@@ -7,13 +7,7 @@ namespace ContactSync.OldApp.Publisher.Services;
///
/// Provides the Change Data Capture (CDC) entity (aggregate root) capabilities (database table '[old].[Contact]').
///
-public partial class ContactService : CdcService
-{
- ///
- /// Initializes a new instance of the class.
- ///
- /// The .
- /// The .
- /// The .
- public ContactService(IServiceProvider serviceProvider, ILogger logger, SettingsBase settings) : base(serviceProvider, logger, settings) { }
-}
\ No newline at end of file
+/// The .
+/// The .
+/// The .
+public partial class ContactService(IServiceProvider serviceProvider, ILogger logger, SettingsBase settings) : CdcService(serviceProvider, logger, settings) { }
\ No newline at end of file
diff --git a/samples/SqlServerDemo/SqlServerDemo.Database/SqlServerDemo.Database.csproj b/samples/SqlServerDemo/SqlServerDemo.Database/SqlServerDemo.Database.csproj
index 5af5992..f6caced 100644
--- a/samples/SqlServerDemo/SqlServerDemo.Database/SqlServerDemo.Database.csproj
+++ b/samples/SqlServerDemo/SqlServerDemo.Database/SqlServerDemo.Database.csproj
@@ -17,7 +17,7 @@
-
+
\ No newline at end of file
diff --git a/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/EventOutboxDequeue.cs b/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/EventOutboxDequeue.cs
index b390ca5..d2a7edf 100644
--- a/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/EventOutboxDequeue.cs
+++ b/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/EventOutboxDequeue.cs
@@ -7,16 +7,11 @@ namespace SqlServerDemo.Publisher.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/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/EventOutboxEnqueue.cs b/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/EventOutboxEnqueue.cs
index 2298577..591508c 100644
--- a/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/EventOutboxEnqueue.cs
+++ b/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/EventOutboxEnqueue.cs
@@ -7,15 +7,10 @@ namespace SqlServerDemo.Publisher.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/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/IdentifierMappingMapper.cs b/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/IdentifierMappingMapper.cs
index 104f21d..f8c76a5 100644
--- a/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/IdentifierMappingMapper.cs
+++ b/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/IdentifierMappingMapper.cs
@@ -8,10 +8,4 @@ namespace SqlServerDemo.Publisher.Data;
/// Provides the database mapper for table '[NTangle].[IdentifierMapping]'.
///
/// The global identifier .
-public class IdentifierMappingMapper : IdentifierMappingMapperBase
-{
- ///
- /// Initializes a new instance of the class.
- ///
- public IdentifierMappingMapper() : base("[NTangle].[udtIdentifierMappingList]") { }
-}
\ No newline at end of file
+public class IdentifierMappingMapper() : IdentifierMappingMapperBase("[NTangle].[udtIdentifierMappingList]") { }
\ No newline at end of file
diff --git a/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/VersionTrackingMapper.cs b/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/VersionTrackingMapper.cs
index ffb8c0c..3f83184 100644
--- a/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/VersionTrackingMapper.cs
+++ b/samples/SqlServerDemo/SqlServerDemo.Publisher/Data/Generated/VersionTrackingMapper.cs
@@ -7,10 +7,4 @@ namespace SqlServerDemo.Publisher.Data;
///
/// Provides the database mapper for table '[NTangle].[VersionTracking]'.
///
-public class VersionTrackingMapper : VersionTrackingMapperBase
-{
- ///
- /// Initializes a new instance of the class.
- ///
- public VersionTrackingMapper() : base("[NTangle].[udtVersionTrackingList]") { }
-}
\ No newline at end of file
+public class VersionTrackingMapper() : VersionTrackingMapperBase("[NTangle].[udtVersionTrackingList]") { }
\ No newline at end of file
diff --git a/samples/SqlServerDemo/SqlServerDemo.Publisher/SqlServerDemo.Publisher.csproj b/samples/SqlServerDemo/SqlServerDemo.Publisher/SqlServerDemo.Publisher.csproj
index 1798875..06c0723 100644
--- a/samples/SqlServerDemo/SqlServerDemo.Publisher/SqlServerDemo.Publisher.csproj
+++ b/samples/SqlServerDemo/SqlServerDemo.Publisher/SqlServerDemo.Publisher.csproj
@@ -23,7 +23,7 @@
-
+
diff --git a/samples/SqlServerDemo/SqlServerDemo.Test/SqlServerDemo.Test.csproj b/samples/SqlServerDemo/SqlServerDemo.Test/SqlServerDemo.Test.csproj
index f7ca749..115b026 100644
--- a/samples/SqlServerDemo/SqlServerDemo.Test/SqlServerDemo.Test.csproj
+++ b/samples/SqlServerDemo/SqlServerDemo.Test/SqlServerDemo.Test.csproj
@@ -7,15 +7,15 @@
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/NTangle/NTangle.csproj b/src/NTangle/NTangle.csproj
index 2eb488b..d57684c 100644
--- a/src/NTangle/NTangle.csproj
+++ b/src/NTangle/NTangle.csproj
@@ -10,8 +10,8 @@
-
-
+
+
diff --git a/tests/NTangle.Test/NTangle.Test.csproj b/tests/NTangle.Test/NTangle.Test.csproj
index 7340508..a419321 100644
--- a/tests/NTangle.Test/NTangle.Test.csproj
+++ b/tests/NTangle.Test/NTangle.Test.csproj
@@ -14,11 +14,11 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/tools/NTangle.CodeGen/NTangle.CodeGen.csproj b/tools/NTangle.CodeGen/NTangle.CodeGen.csproj
index bf9c610..44bf4b8 100644
--- a/tools/NTangle.CodeGen/NTangle.CodeGen.csproj
+++ b/tools/NTangle.CodeGen/NTangle.CodeGen.csproj
@@ -15,8 +15,8 @@
-
-
+
+
diff --git a/tools/NTangle.CodeGen/Templates/EntityService_cs.hbs b/tools/NTangle.CodeGen/Templates/EntityService_cs.hbs
index 970c8be..618b019 100644
--- a/tools/NTangle.CodeGen/Templates/EntityService_cs.hbs
+++ b/tools/NTangle.CodeGen/Templates/EntityService_cs.hbs
@@ -8,13 +8,7 @@ namespace {{Root.NamespacePublisher}}.Services;
///
/// Provides the Change Data Capture (CDC) entity (aggregate root) capabilities (database table '[{{Schema}}].[{{Name}}]').
///
-public partial class {{Model}}Service : CdcService
-{
- ///
- /// Initializes a new instance of the class.
- ///
- /// The .
- /// The .
- /// The .
- public {{Model}}Service(IServiceProvider serviceProvider, ILogger<{{Model}}Service> logger, SettingsBase settings) : base(serviceProvider, logger, settings) { }
-}
\ No newline at end of file
+/// The .
+/// The .
+/// The .
+public partial class {{Model}}Service(IServiceProvider serviceProvider, ILogger<{{Model}}Service> logger, SettingsBase settings) : CdcService(serviceProvider, logger, settings) { }
\ No newline at end of file
diff --git a/tools/NTangle.CodeGen/Templates/IdentifierMappingMapper_cs.hbs b/tools/NTangle.CodeGen/Templates/IdentifierMappingMapper_cs.hbs
index e35131e..40d3a0f 100644
--- a/tools/NTangle.CodeGen/Templates/IdentifierMappingMapper_cs.hbs
+++ b/tools/NTangle.CodeGen/Templates/IdentifierMappingMapper_cs.hbs
@@ -9,10 +9,4 @@ namespace {{Root.NamespacePublisher}}.Data;
/// Provides the database mapper for table '[{{Root.CdcSchema}}].[{{Root.IdentifierMappingTable}}]'.
///
/// The global identifier .
-public class IdentifierMappingMapper : IdentifierMappingMapperBase
-{
- ///
- /// Initializes a new instance of the class.
- ///
- public IdentifierMappingMapper() : base("[{{Root.CdcSchema}}].[udt{{Root.IdentifierMappingTable}}List]") { }
-}
\ No newline at end of file
+public class IdentifierMappingMapper() : IdentifierMappingMapperBase("[{{Root.CdcSchema}}].[udt{{Root.IdentifierMappingTable}}List]") { }
\ No newline at end of file
diff --git a/tools/NTangle.CodeGen/Templates/VersionTrackingMapper_cs.hbs b/tools/NTangle.CodeGen/Templates/VersionTrackingMapper_cs.hbs
index 9a8a666..b5262cb 100644
--- a/tools/NTangle.CodeGen/Templates/VersionTrackingMapper_cs.hbs
+++ b/tools/NTangle.CodeGen/Templates/VersionTrackingMapper_cs.hbs
@@ -8,10 +8,4 @@ namespace {{Root.NamespacePublisher}}.Data;
///
/// Provides the database mapper for table '[{{Root.CdcSchema}}].[{{Root.VersionTrackingTable}}]'.
///
-public class VersionTrackingMapper : VersionTrackingMapperBase
-{
- ///
- /// Initializes a new instance of the class.
- ///
- public VersionTrackingMapper() : base("[{{Root.CdcSchema}}].[udt{{Root.VersionTrackingTable}}List]") { }
-}
\ No newline at end of file
+public class VersionTrackingMapper() : VersionTrackingMapperBase("[{{Root.CdcSchema}}].[udt{{Root.VersionTrackingTable}}List]") { }
\ No newline at end of file
diff --git a/tools/NTangle.Template/content/AppName.CodeGen/AppName.CodeGen.csproj b/tools/NTangle.Template/content/AppName.CodeGen/AppName.CodeGen.csproj
index ca7f8c8..66293ec 100644
--- a/tools/NTangle.Template/content/AppName.CodeGen/AppName.CodeGen.csproj
+++ b/tools/NTangle.Template/content/AppName.CodeGen/AppName.CodeGen.csproj
@@ -5,7 +5,7 @@
enable
-
+
diff --git a/tools/NTangle.Template/content/AppName.Database/AppName.Database.csproj b/tools/NTangle.Template/content/AppName.Database/AppName.Database.csproj
index 330c12a..436e712 100644
--- a/tools/NTangle.Template/content/AppName.Database/AppName.Database.csproj
+++ b/tools/NTangle.Template/content/AppName.Database/AppName.Database.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/tools/NTangle.Template/content/AppName.Publisher/AppName.Publisher.csproj b/tools/NTangle.Template/content/AppName.Publisher/AppName.Publisher.csproj
index a088958..f933fcc 100644
--- a/tools/NTangle.Template/content/AppName.Publisher/AppName.Publisher.csproj
+++ b/tools/NTangle.Template/content/AppName.Publisher/AppName.Publisher.csproj
@@ -8,7 +8,7 @@
-
+
@@ -29,7 +29,7 @@
-
+
diff --git a/tools/NTangle.Template/content/AppName.Publisher/DomainNameSettings.cs b/tools/NTangle.Template/content/AppName.Publisher/DomainNameSettings.cs
index 27289bd..09adfeb 100644
--- a/tools/NTangle.Template/content/AppName.Publisher/DomainNameSettings.cs
+++ b/tools/NTangle.Template/content/AppName.Publisher/DomainNameSettings.cs
@@ -3,14 +3,9 @@
///
/// Provides the AppName settings.
///
-public class DomainNameSettings : SettingsBase
+/// The .
+public class DomainNameSettings(IConfiguration configuration) : SettingsBase(configuration, "DomainName")
{
- ///
- /// Initializes a new instance of the class.
- ///
- /// The .
- public DomainNameSettings(IConfiguration configuration) : base(configuration, "DomainName") { }
-
///
/// Gets the SQL Server database connection string.
///
diff --git a/tools/NTangle.Template/content/AppName.Publisher/Functions/ContactFunction.cs b/tools/NTangle.Template/content/AppName.Publisher/Functions/ContactFunction.cs
index 53c2dbe..4047bd0 100644
--- a/tools/NTangle.Template/content/AppName.Publisher/Functions/ContactFunction.cs
+++ b/tools/NTangle.Template/content/AppName.Publisher/Functions/ContactFunction.cs
@@ -1,10 +1,8 @@
namespace AppName.Publisher.Functions;
-public class ContactFunction
+public class ContactFunction(ContactService contactService)
{
- private readonly ContactService _contactService;
-
- public ContactFunction(ContactService contactService) => _contactService = contactService.ThrowIfNull();
+ private readonly ContactService _contactService = contactService.ThrowIfNull();
[Function(nameof(ContactFunction))]
public Task RunAsync([TimerTrigger("*/5 * * * * *")] TimerInfo timer, CancellationToken cancellationToken) => _contactService.ExecuteAsync(cancellationToken);
diff --git a/tools/NTangle.Template/content/AppName.Publisher/Functions/RelayFunction.cs b/tools/NTangle.Template/content/AppName.Publisher/Functions/RelayFunction.cs
index da3a43a..55f23d3 100644
--- a/tools/NTangle.Template/content/AppName.Publisher/Functions/RelayFunction.cs
+++ b/tools/NTangle.Template/content/AppName.Publisher/Functions/RelayFunction.cs
@@ -1,10 +1,8 @@
namespace AppName.Publisher.Functions;
-public class PublishFunction
+public class PublishFunction(EventOutboxService eventOutboxService)
{
- private readonly EventOutboxService _eventOutboxService;
-
- public PublishFunction(EventOutboxService eventOutboxService) => _eventOutboxService = eventOutboxService.ThrowIfNull();
+ private readonly EventOutboxService _eventOutboxService = eventOutboxService.ThrowIfNull();
[Function(nameof(PublishFunction))]
public Task RunAsync([TimerTrigger("*/5 * * * * *")] TimerInfo timer, CancellationToken cancellationToken) => _eventOutboxService.ExecuteAsync(cancellationToken);