From a8d5c592ab30bc7ea60d82e64f1008763870a0e5 Mon Sep 17 00:00:00 2001 From: Eric Sibly Date: Mon, 26 Feb 2024 12:52:07 -0800 Subject: [PATCH] Upgrade to latest CoreEx/DbEx. --- CHANGELOG.md | 5 ++++- Common.targets | 2 +- .../ContactSync.NewApp.Database.csproj | 2 +- .../ContactSync.NewApp.Subscriber.csproj | 8 ++++---- .../ContactSync.NewApp.Subscriber/Startup.cs | 2 +- .../ContactSync.OldApp.Database.csproj | 2 +- .../ContactSync.OldApp.Publisher.csproj | 4 ++-- .../SqlServerDemo.Database/SqlServerDemo.Database.csproj | 2 +- .../SqlServerDemo.Publisher.csproj | 2 +- .../SqlServerDemo.Test/SqlServerDemo.Test.csproj | 8 ++++---- src/NTangle/NTangle.csproj | 2 +- tests/NTangle.Test/NTangle.Test.csproj | 6 +++--- tools/NTangle.CodeGen/Config/RootConfig.cs | 8 ++++---- tools/NTangle.CodeGen/NTangle.CodeGen.csproj | 4 ++-- .../content/AppName.CodeGen/AppName.CodeGen.csproj | 2 +- .../content/AppName.Database/AppName.Database.csproj | 2 +- .../content/AppName.Publisher/AppName.Publisher.csproj | 2 +- 17 files changed, 33 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 210c093..c58923c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,11 @@ Represents the **NuGet** versions. +## v2.5.0 +- *Enhancement:* Updated `DbEx` (`v2.5.0`) and`CoreEx` (`v3.12.0`) and other dependencies. + ## v2.4.0 -- *Fixed:* Updated `DbEx` (`v2.4.0`) and`CoreEx` (`v3.9.0`) and other dependencies. +- *Enhancement:* Updated `DbEx` (`v2.4.0`) and`CoreEx` (`v3.9.0`) and other dependencies. - *Enhancement:* Updated the `dotnet new ntangle` template to target `net8.0` and [isolated](https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-process-guide) functions. ## v2.3.6 diff --git a/Common.targets b/Common.targets index 77302d4..ba3f923 100644 --- a/Common.targets +++ b/Common.targets @@ -1,6 +1,6 @@ - 2.4.0 + 2.5.0 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 828296a..54dcdbc 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 93e0d63..d0b00e9 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.NewApp/ContactSync.NewApp.Subscriber/Startup.cs b/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Subscriber/Startup.cs index b7070cd..259e70d 100644 --- a/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Subscriber/Startup.cs +++ b/samples/ContactSync/ContactSync.NewApp/ContactSync.NewApp.Subscriber/Startup.cs @@ -28,7 +28,7 @@ public override void Configure(IFunctionsHostBuilder builder) }) .AddAzureServiceBusOrchestratedSubscriber((_, o) => // Register the AzureServiceBusOrchestratedSubscriber (uses EventSubscriberOrchestrator above); this is what is used in the Azure Function. { - o.EventDataDeserializationErrorHandling = ErrorHandling.Handle; + o.EventDataDeserializationErrorHandling = ErrorHandling.HandleBySubscriber; o.InvalidDataHandling = ErrorHandling.CompleteWithError; }); } 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 2613c11..99610e8 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 864874d..64881ea 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,10 +23,10 @@ - + - + diff --git a/samples/SqlServerDemo/SqlServerDemo.Database/SqlServerDemo.Database.csproj b/samples/SqlServerDemo/SqlServerDemo.Database/SqlServerDemo.Database.csproj index 97bb892..5af5992 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/SqlServerDemo.Publisher.csproj b/samples/SqlServerDemo/SqlServerDemo.Publisher/SqlServerDemo.Publisher.csproj index 44a1b09..da2c36b 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 518f4ad..f7ca749 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 5b6363a..cd9c13d 100644 --- a/src/NTangle/NTangle.csproj +++ b/src/NTangle/NTangle.csproj @@ -10,7 +10,7 @@ - + diff --git a/tests/NTangle.Test/NTangle.Test.csproj b/tests/NTangle.Test/NTangle.Test.csproj index 154ba39..7340508 100644 --- a/tests/NTangle.Test/NTangle.Test.csproj +++ b/tests/NTangle.Test/NTangle.Test.csproj @@ -11,14 +11,14 @@ - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/tools/NTangle.CodeGen/Config/RootConfig.cs b/tools/NTangle.CodeGen/Config/RootConfig.cs index 80c8ca9..aaaa235 100644 --- a/tools/NTangle.CodeGen/Config/RootConfig.cs +++ b/tools/NTangle.CodeGen/Config/RootConfig.cs @@ -2,8 +2,8 @@ using DbEx; using DbEx.DbSchema; -using DbEx.SqlServer; -using Microsoft.Data.SqlClient; +using DbEx.Migration; +using DbEx.SqlServer.Migration; using Microsoft.Extensions.Logging; using OnRamp; using OnRamp.Config; @@ -472,8 +472,8 @@ private async Task LoadDbTablesConfigAsync() var sw = Stopwatch.StartNew(); var db = (CodeGenArgs.GetCreateDatabase(false)?.Invoke(CodeGenArgs.ConnectionString!)) ?? throw new CodeGenException(this, null, "A database provider must be specified during application startup, consider using the likes of 'UseSqlServer' to specify; e.g: 'CodeGenConsole.Create(\"...\").UseSqlServer().RunAsync(args)'."); - var csb = new SqlConnectionStringBuilder(CodeGenArgs.ConnectionString); - DbTables = await db.SelectSchemaAsync(new SqlServerSchemaConfig(csb.InitialCatalog)).ConfigureAwait(false); + var ssm = new SqlServerMigration(new MigrationArgs { ConnectionString = CodeGenArgs.ConnectionString }); + DbTables = await db.SelectSchemaAsync(ssm).ConfigureAwait(false); sw.Stop(); CodeGenArgs.Logger?.Log(LogLevel.Information, "{Content}", $" Database schema query complete [{sw.Elapsed.TotalMilliseconds}ms]"); diff --git a/tools/NTangle.CodeGen/NTangle.CodeGen.csproj b/tools/NTangle.CodeGen/NTangle.CodeGen.csproj index fa9649b..62fd752 100644 --- a/tools/NTangle.CodeGen/NTangle.CodeGen.csproj +++ b/tools/NTangle.CodeGen/NTangle.CodeGen.csproj @@ -15,8 +15,8 @@ - - + + diff --git a/tools/NTangle.Template/content/AppName.CodeGen/AppName.CodeGen.csproj b/tools/NTangle.Template/content/AppName.CodeGen/AppName.CodeGen.csproj index 85388a9..6c72f5c 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 1e62cc3..330c12a 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 48eac9e..b80d940 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 @@ - +