diff --git a/.github/workflows/chapter-3-contracts-package-workflow.yml b/.github/workflows/chapter-3-contracts-package-workflow.yml
index 9539ca03..1a850bc7 100644
--- a/.github/workflows/chapter-3-contracts-package-workflow.yml
+++ b/.github/workflows/chapter-3-contracts-package-workflow.yml
@@ -2,17 +2,17 @@ name: Contracts package workflow
on:
push:
- branches: [ "main" ]
+ branches: ["main"]
paths:
- - 'Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationEvents/**'
+ - "Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationEvents/**"
pull_request:
- branches: [ "main" ]
+ branches: ["main"]
paths:
- - 'Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationEvents/**'
+ - "Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationEvents/**"
env:
- CHAPTER_DIR: 'Chapter-3-microservice-extraction/Fitnet.Contracts/Src'
- NUGET_SOURCE_NAME: "evolutionaryArchitecture"
+ CHAPTER_DIR: "Chapter-3-microservice-extraction/Fitnet.Contracts/Src"
+ NUGET_SOURCE_NAME: "EvolutionaryArchitecture"
jobs:
build:
@@ -22,22 +22,22 @@ jobs:
runs-on: ubuntu-latest
name: Build
steps:
- - uses: actions/checkout@v3
- - name: Setup .NET
- uses: actions/setup-dotnet@v3
- with:
- dotnet-version: 9.0.x
- - name: Add Evolutionary Architecture Nuget Source
- uses: evolutionary-architecture/evolutionary-architecture-by-example/.github@main
- with:
+ - uses: actions/checkout@v3
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: 9.0.x
+ - name: Add Evolutionary Architecture Nuget Source
+ uses: evolutionary-architecture/evolutionary-architecture-by-example/.github@main
+ with:
github-token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
path: ${{ env.CHAPTER_DIR }}
nuget-source-name: ${{ env.NUGET_SOURCE_NAME }}
- - name: Restore dependencies
- run: dotnet restore
- - name: Build
- run: dotnet build --no-restore
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Build
+ run: dotnet build --no-restore
pack:
defaults:
@@ -48,19 +48,19 @@ jobs:
if: github.ref == 'refs/heads/main'
name: Pack and Publish
steps:
- - uses: actions/checkout@v3
- - name: Setup .NET
- uses: actions/setup-dotnet@v3
- with:
- dotnet-version: 9.0.x
- - name: Add Evolutionary Architecture Nuget Source
- uses: evolutionary-architecture/evolutionary-architecture-by-example/.github@main
- with:
+ - uses: actions/checkout@v3
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: 9.0.x
+ - name: Add Evolutionary Architecture Nuget Source
+ uses: evolutionary-architecture/evolutionary-architecture-by-example/.github@main
+ with:
github-token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ github.repository_owner }}
path: ${{ env.CHAPTER_DIR }}
nuget-source-name: ${{ env.NUGET_SOURCE_NAME }}
- - name: Pack Project
- run: dotnet pack Fitnet.Contracts.IntegrationEvents/Fitnet.Contracts.IntegrationEvents.csproj -c Release
- - name: Publish Packages
- run: dotnet nuget push "Fitnet.Contracts.IntegrationEvents/bin/Release/EvolutionaryArchitecture.Fitnet.Contracts.IntegrationEvents.*.nupkg" --source ${{ env.NUGET_SOURCE_NAME }} --api-key ${{ secrets.GITHUB_TOKEN }}
+ - name: Pack Project
+ run: dotnet pack Fitnet.Contracts.IntegrationEvents/Fitnet.Contracts.IntegrationEvents.csproj -c Release
+ - name: Publish Packages
+ run: dotnet nuget push "Fitnet.Contracts.IntegrationEvents/bin/Release/EvolutionaryArchitecture.Fitnet.Contracts.IntegrationEvents.*.nupkg" --source ${{ env.NUGET_SOURCE_NAME }} --api-key ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/chapter-3-contracts-workflow.yml b/.github/workflows/chapter-3-contracts-workflow.yml
index a9fe8d0c..38b3c354 100644
--- a/.github/workflows/chapter-3-contracts-workflow.yml
+++ b/.github/workflows/chapter-3-contracts-workflow.yml
@@ -11,8 +11,8 @@ on:
env:
CHAPTER_DIR: "Chapter-3-microservice-extraction/Fitnet.Contracts/Src"
- NUGET_SOURCE_NAME: "evolutionaryArchitecture"
-
+ NUGET_SOURCE_NAME: "EvolutionaryArchitecture"
+
jobs:
build:
defaults:
diff --git a/.github/workflows/chapter-3-package-workflow.yml b/.github/workflows/chapter-3-package-workflow.yml
index d23ff8eb..f6e0aae8 100644
--- a/.github/workflows/chapter-3-package-workflow.yml
+++ b/.github/workflows/chapter-3-package-workflow.yml
@@ -2,19 +2,19 @@ name: Chapter 3 package workflow
on:
push:
- branches: [ "main" ]
+ branches: ["main"]
paths:
- - 'Chapter-3-microservice-extraction/Fitnet.Common/**'
+ - "Chapter-3-microservice-extraction/Fitnet.Common/**"
pull_request:
- branches: [ "main" ]
+ branches: ["main"]
paths:
- - 'Chapter-3-microservice-extraction/Fitnet.Common/**'
+ - "Chapter-3-microservice-extraction/Fitnet.Common/**"
env:
- CHAPTER_DIR: 'Chapter-3-microservice-extraction/Fitnet.Common'
- NUGET_SOURCE_NAME: "evolutionaryArchitecture"
+ CHAPTER_DIR: "Chapter-3-microservice-extraction/Fitnet.Common"
+ NUGET_SOURCE_NAME: "EvolutionaryArchitecture"
-jobs:
+jobs:
build:
defaults:
run:
@@ -31,7 +31,7 @@ jobs:
run: dotnet restore
- name: Build
run: dotnet build --no-restore
-
+
test:
defaults:
run:
@@ -51,7 +51,7 @@ jobs:
- name: Test
run: dotnet test
- pack:
+ pack:
defaults:
run:
working-directory: ${{ env.CHAPTER_DIR }}
@@ -65,7 +65,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
-
+
- name: Pack Projects
run: |
dotnet pack Fitnet.Common.Api/Fitnet.Common.Api.csproj -c Release
@@ -80,7 +80,7 @@ jobs:
owner: ${{ github.repository_owner }}
path: ${{ env.CHAPTER_DIR }}
nuget-source-name: ${{ env.NUGET_SOURCE_NAME }}
-
+
- name: Publish Packages
run: |
dotnet nuget push "Fitnet.Common.Api/bin/Release/EvolutionaryArchitecture.Fitnet.Common.Api.*.nupkg" --source ${{ env.NUGET_SOURCE_NAME }} --api-key ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/chapter-3-workflow.yml b/.github/workflows/chapter-3-workflow.yml
index 84f28fe8..d4072034 100644
--- a/.github/workflows/chapter-3-workflow.yml
+++ b/.github/workflows/chapter-3-workflow.yml
@@ -12,7 +12,7 @@ on:
env:
CHAPTER_DIR: "Chapter-3-microservice-extraction/Fitnet/Src"
- NUGET_SOURCE_NAME: "evolutionaryArchitecture"
+ NUGET_SOURCE_NAME: "EvolutionaryArchitecture"
jobs:
build:
diff --git a/Chapter-3-microservice-extraction/Fitnet.Common/Directory.Build.props b/Chapter-3-microservice-extraction/Fitnet.Common/Directory.Build.props
index 810e9f2a..c09de8b0 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Common/Directory.Build.props
+++ b/Chapter-3-microservice-extraction/Fitnet.Common/Directory.Build.props
@@ -12,7 +12,7 @@
true
true
https://github.com/evolutionary-architecture/evolutionary-architecture-by-example
- 3.2.5
+ 3.3.0
diff --git a/Chapter-3-microservice-extraction/Fitnet.Common/Directory.Packages.props b/Chapter-3-microservice-extraction/Fitnet.Common/Directory.Packages.props
new file mode 100644
index 00000000..45c1560b
--- /dev/null
+++ b/Chapter-3-microservice-extraction/Fitnet.Common/Directory.Packages.props
@@ -0,0 +1,33 @@
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Api.UnitTests/Fitnet.Common.Api.UnitTests.csproj b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Api.UnitTests/Fitnet.Common.Api.UnitTests.csproj
index ef476753..ede13f6b 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Api.UnitTests/Fitnet.Common.Api.UnitTests.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Api.UnitTests/Fitnet.Common.Api.UnitTests.csproj
@@ -9,11 +9,10 @@
-
-
-
-
-
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Api/Fitnet.Common.Api.csproj b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Api/Fitnet.Common.Api.csproj
index 4bd6eaa4..489b2d5a 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Api/Fitnet.Common.Api.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Api/Fitnet.Common.Api.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Core.UnitTests/Fitnet.Common.Core.UnitTests.csproj b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Core.UnitTests/Fitnet.Common.Core.UnitTests.csproj
index 0700fcf4..f18ab4ea 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Core.UnitTests/Fitnet.Common.Core.UnitTests.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Core.UnitTests/Fitnet.Common.Core.UnitTests.csproj
@@ -9,11 +9,10 @@
-
-
-
-
-
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Core/Fitnet.Common.Core.csproj b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Core/Fitnet.Common.Core.csproj
index cf3d06ef..3a8cea17 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Core/Fitnet.Common.Core.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Core/Fitnet.Common.Core.csproj
@@ -1,7 +1,7 @@
-
+
diff --git a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Infrastructure/Fitnet.Common.Infrastructure.csproj b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Infrastructure/Fitnet.Common.Infrastructure.csproj
index cccbdee5..2331b97b 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Infrastructure/Fitnet.Common.Infrastructure.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.Infrastructure/Fitnet.Common.Infrastructure.csproj
@@ -1,11 +1,10 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.IntegrationTestsToolbox/Fitnet.Common.IntegrationTestsToolbox.csproj b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.IntegrationTestsToolbox/Fitnet.Common.IntegrationTestsToolbox.csproj
index 5bf5e790..72e7a5fe 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.IntegrationTestsToolbox/Fitnet.Common.IntegrationTestsToolbox.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.IntegrationTestsToolbox/Fitnet.Common.IntegrationTestsToolbox.csproj
@@ -5,22 +5,22 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
+
+
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.IntegrationTestsToolbox/TestEngine/EventBus/EventBusAssertions.cs b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.IntegrationTestsToolbox/TestEngine/EventBus/EventBusAssertions.cs
index ce745deb..dbc068e9 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.IntegrationTestsToolbox/TestEngine/EventBus/EventBusAssertions.cs
+++ b/Chapter-3-microservice-extraction/Fitnet.Common/Fitnet.Common.IntegrationTestsToolbox/TestEngine/EventBus/EventBusAssertions.cs
@@ -1,10 +1,10 @@
namespace EvolutionaryArchitecture.Fitnet.Common.IntegrationTestsToolbox.TestEngine.EventBus;
-using FluentAssertions;
using MassTransit.Testing;
+using Shouldly;
public static class EventBusAssertions
{
public static void EnsureConsumed(this ITestHarness harness) where TEvent : class =>
- harness.Consumed.Select().Any().Should().BeTrue();
+ harness.Consumed.Select().Any().ShouldBeTrue();
}
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Directory.Packages.props b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Directory.Packages.props
new file mode 100644
index 00000000..afb29c0a
--- /dev/null
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Directory.Packages.props
@@ -0,0 +1,35 @@
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Api.UnitTests/Fitnet.Contracts.Api.UnitTests.csproj b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Api.UnitTests/Fitnet.Contracts.Api.UnitTests.csproj
index f028d4ab..81debafc 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Api.UnitTests/Fitnet.Contracts.Api.UnitTests.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Api.UnitTests/Fitnet.Contracts.Api.UnitTests.csproj
@@ -1,18 +1,18 @@
-
-
-
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Api/Fitnet.Contracts.Api.csproj b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Api/Fitnet.Contracts.Api.csproj
index 001181fb..e9c5cd3c 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Api/Fitnet.Contracts.Api.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Api/Fitnet.Contracts.Api.csproj
@@ -17,7 +17,7 @@
-
+
\ No newline at end of file
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Application/Fitnet.Contracts.Application.csproj b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Application/Fitnet.Contracts.Application.csproj
index f6a3572e..a83558af 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Application/Fitnet.Contracts.Application.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Application/Fitnet.Contracts.Application.csproj
@@ -1,9 +1,9 @@
-
-
-
-
+
+
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Core.UnitTests/Fitnet.Contracts.Core.UnitTests.csproj b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Core.UnitTests/Fitnet.Contracts.Core.UnitTests.csproj
index cc5e5759..da7106ea 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Core.UnitTests/Fitnet.Contracts.Core.UnitTests.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Core.UnitTests/Fitnet.Contracts.Core.UnitTests.csproj
@@ -5,21 +5,21 @@
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
+
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Core/Fitnet.Contracts.Core.csproj b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Core/Fitnet.Contracts.Core.csproj
index 1295a91a..0f88ab29 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Core/Fitnet.Contracts.Core.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Core/Fitnet.Contracts.Core.csproj
@@ -5,7 +5,7 @@
-
+
\ No newline at end of file
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Infrastructure/Fitnet.Contracts.Infrastructure.csproj b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Infrastructure/Fitnet.Contracts.Infrastructure.csproj
index cf2f4e48..97aee77c 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Infrastructure/Fitnet.Contracts.Infrastructure.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.Infrastructure/Fitnet.Contracts.Infrastructure.csproj
@@ -5,13 +5,12 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationEvents/Fitnet.Contracts.IntegrationEvents.csproj b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationEvents/Fitnet.Contracts.IntegrationEvents.csproj
index 0d1bfd77..094aec41 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationEvents/Fitnet.Contracts.IntegrationEvents.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationEvents/Fitnet.Contracts.IntegrationEvents.csproj
@@ -4,8 +4,6 @@
1.0.7
-
-
-
+
\ No newline at end of file
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationTests/Fitnet.Contracts.IntegrationTests.csproj b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationTests/Fitnet.Contracts.IntegrationTests.csproj
index cf061282..97d2194d 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationTests/Fitnet.Contracts.IntegrationTests.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts.IntegrationTests/Fitnet.Contracts.IntegrationTests.csproj
@@ -5,13 +5,10 @@
-
-
-
-
-
-
-
+
+
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj
index c9e7c8bc..9e9d68a9 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Fitnet.Contracts.csproj
@@ -5,9 +5,9 @@
-
-
-
+
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs
index fce90846..53578f1b 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/Fitnet.Contracts/Program.cs
@@ -26,7 +26,7 @@
app.MapControllers();
app.RegisterContractsApi();
-app.Run();
+await app.RunAsync();
namespace EvolutionaryArchitecture.Fitnet.Contracts
{
diff --git a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/nuget.config b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/nuget.config
index d4fe5249..d167d5f4 100644
--- a/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/nuget.config
+++ b/Chapter-3-microservice-extraction/Fitnet.Contracts/Src/nuget.config
@@ -7,11 +7,17 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
\ No newline at end of file
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Directory.Packages.props b/Chapter-3-microservice-extraction/Fitnet/Src/Directory.Packages.props
new file mode 100644
index 00000000..73f22399
--- /dev/null
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Directory.Packages.props
@@ -0,0 +1,51 @@
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Fitnet.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Fitnet.csproj
index 09e7639c..f4958bce 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Fitnet.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Fitnet.csproj
@@ -5,9 +5,12 @@
-
-
-
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Program.cs b/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Program.cs
index 7b12a1ce..fd3c399e 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Program.cs
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Fitnet/Program.cs
@@ -38,7 +38,7 @@
app.RegisterOffers(Module.Offers);
app.RegisterReports(Module.Reports);
-app.Run();
+await app.RunAsync();
namespace EvolutionaryArchitecture.Fitnet
{
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.Api/Fitnet.Offers.Api.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.Api/Fitnet.Offers.Api.csproj
index d3657cdf..4d123d3f 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.Api/Fitnet.Offers.Api.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.Api/Fitnet.Offers.Api.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.DataAccess/Fitnet.Offers.DataAccess.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.DataAccess/Fitnet.Offers.DataAccess.csproj
index 1f134401..4f4c6168 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.DataAccess/Fitnet.Offers.DataAccess.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Fitnet.Offers.DataAccess/Fitnet.Offers.DataAccess.csproj
@@ -1,8 +1,7 @@
-
-
-
-
+
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Tests/Fitnet.Offers.IntegrationTests/Fitnet.Offers.IntegrationTests.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Tests/Fitnet.Offers.IntegrationTests/Fitnet.Offers.IntegrationTests.csproj
index 4bf9bcf8..a4a4552d 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Tests/Fitnet.Offers.IntegrationTests/Fitnet.Offers.IntegrationTests.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Offers/Tests/Fitnet.Offers.IntegrationTests/Fitnet.Offers.IntegrationTests.csproj
@@ -5,14 +5,11 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.Api/Fitnet.Passes.Api.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.Api/Fitnet.Passes.Api.csproj
index 5d3bd711..715ed559 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.Api/Fitnet.Passes.Api.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.Api/Fitnet.Passes.Api.csproj
@@ -15,12 +15,11 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/20250927073029_AddMissingForeignKeys.Designer.cs b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/20250927073029_AddMissingForeignKeys.Designer.cs
new file mode 100644
index 00000000..b64a9dfc
--- /dev/null
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/20250927073029_AddMissingForeignKeys.Designer.cs
@@ -0,0 +1,231 @@
+//
+using System;
+using EvolutionaryArchitecture.Fitnet.Passes.DataAccess.Database;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace EvolutionaryArchitecture.Fitnet.Passes.DataAccess.Database.Migrations
+{
+ [DbContext(typeof(PassesPersistence))]
+ [Migration("20250927073029_AddMissingForeignKeys")]
+ partial class AddMissingForeignKeys
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasDefaultSchema("Passes")
+ .HasAnnotation("ProductVersion", "9.0.9")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("EvolutionaryArchitecture.Fitnet.Passes.DataAccess.Pass", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("CustomerId")
+ .HasColumnType("uuid");
+
+ b.Property("From")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("To")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("Id");
+
+ b.ToTable("Passes", "Passes");
+ });
+
+ modelBuilder.Entity("MassTransit.EntityFrameworkCoreIntegration.InboxState", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
+
+ b.Property("Consumed")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ConsumerId")
+ .HasColumnType("uuid");
+
+ b.Property("Delivered")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ExpirationTime")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("LastSequenceNumber")
+ .HasColumnType("bigint");
+
+ b.Property("LockId")
+ .HasColumnType("uuid");
+
+ b.Property("MessageId")
+ .HasColumnType("uuid");
+
+ b.Property("ReceiveCount")
+ .HasColumnType("integer");
+
+ b.Property("Received")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("RowVersion")
+ .IsConcurrencyToken()
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("bytea");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Delivered");
+
+ b.ToTable("InboxState", "Passes");
+ });
+
+ modelBuilder.Entity("MassTransit.EntityFrameworkCoreIntegration.OutboxMessage", b =>
+ {
+ b.Property("SequenceNumber")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bigint");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("SequenceNumber"));
+
+ b.Property("Body")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("ContentType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("ConversationId")
+ .HasColumnType("uuid");
+
+ b.Property("CorrelationId")
+ .HasColumnType("uuid");
+
+ b.Property("DestinationAddress")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("EnqueueTime")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("ExpirationTime")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("FaultAddress")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("Headers")
+ .HasColumnType("text");
+
+ b.Property("InboxConsumerId")
+ .HasColumnType("uuid");
+
+ b.Property("InboxMessageId")
+ .HasColumnType("uuid");
+
+ b.Property("InitiatorId")
+ .HasColumnType("uuid");
+
+ b.Property("MessageId")
+ .HasColumnType("uuid");
+
+ b.Property("MessageType")
+ .IsRequired()
+ .HasColumnType("text");
+
+ b.Property("OutboxId")
+ .HasColumnType("uuid");
+
+ b.Property("Properties")
+ .HasColumnType("text");
+
+ b.Property("RequestId")
+ .HasColumnType("uuid");
+
+ b.Property("ResponseAddress")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.Property("SentTime")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("SourceAddress")
+ .HasMaxLength(256)
+ .HasColumnType("character varying(256)");
+
+ b.HasKey("SequenceNumber");
+
+ b.HasIndex("EnqueueTime");
+
+ b.HasIndex("ExpirationTime");
+
+ b.HasIndex("OutboxId", "SequenceNumber")
+ .IsUnique();
+
+ b.HasIndex("InboxMessageId", "InboxConsumerId", "SequenceNumber")
+ .IsUnique();
+
+ b.ToTable("OutboxMessage", "Passes");
+ });
+
+ modelBuilder.Entity("MassTransit.EntityFrameworkCoreIntegration.OutboxState", b =>
+ {
+ b.Property("OutboxId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid");
+
+ b.Property("Created")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Delivered")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("LastSequenceNumber")
+ .HasColumnType("bigint");
+
+ b.Property("LockId")
+ .HasColumnType("uuid");
+
+ b.Property("RowVersion")
+ .IsConcurrencyToken()
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("bytea");
+
+ b.HasKey("OutboxId");
+
+ b.HasIndex("Created");
+
+ b.ToTable("OutboxState", "Passes");
+ });
+
+ modelBuilder.Entity("MassTransit.EntityFrameworkCoreIntegration.OutboxMessage", b =>
+ {
+ b.HasOne("MassTransit.EntityFrameworkCoreIntegration.OutboxState", null)
+ .WithMany()
+ .HasForeignKey("OutboxId");
+
+ b.HasOne("MassTransit.EntityFrameworkCoreIntegration.InboxState", null)
+ .WithMany()
+ .HasForeignKey("InboxMessageId", "InboxConsumerId")
+ .HasPrincipalKey("MessageId", "ConsumerId");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/20250927073029_AddMissingForeignKeys.cs b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/20250927073029_AddMissingForeignKeys.cs
new file mode 100644
index 00000000..b3a8c6b7
--- /dev/null
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/20250927073029_AddMissingForeignKeys.cs
@@ -0,0 +1,47 @@
+#nullable disable
+
+namespace EvolutionaryArchitecture.Fitnet.Passes.DataAccess.Database.Migrations;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+///
+public partial class AddMissingForeignKeys : Migration
+{
+ private static readonly string[] columns = ["InboxMessageId", "InboxConsumerId"];
+ private static readonly string[] principalColumns = ["MessageId", "ConsumerId"];
+
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddForeignKey(
+ name: "FK_OutboxMessage_InboxState_InboxMessageId_InboxConsumerId",
+ schema: "Passes",
+ table: "OutboxMessage",
+ columns: columns,
+ principalSchema: "Passes",
+ principalTable: "InboxState",
+ principalColumns: principalColumns);
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_OutboxMessage_OutboxState_OutboxId",
+ schema: "Passes",
+ table: "OutboxMessage",
+ column: "OutboxId",
+ principalSchema: "Passes",
+ principalTable: "OutboxState",
+ principalColumn: "OutboxId");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_OutboxMessage_InboxState_InboxMessageId_InboxConsumerId",
+ schema: "Passes",
+ table: "OutboxMessage");
+
+ migrationBuilder.DropForeignKey(
+ name: "FK_OutboxMessage_OutboxState_OutboxId",
+ schema: "Passes",
+ table: "OutboxMessage");
+ }
+}
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/PassesPersistenceModelSnapshot.cs b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/PassesPersistenceModelSnapshot.cs
index 21678f0f..450ad5b6 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/PassesPersistenceModelSnapshot.cs
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Database/Migrations/PassesPersistenceModelSnapshot.cs
@@ -18,7 +18,7 @@ protected override void BuildModel(ModelBuilder modelBuilder)
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("Passes")
- .HasAnnotation("ProductVersion", "7.0.13")
+ .HasAnnotation("ProductVersion", "9.0.9")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -85,8 +85,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.HasKey("Id");
- b.HasAlternateKey("MessageId", "ConsumerId");
-
b.HasIndex("Delivered");
b.ToTable("InboxState", "Passes");
@@ -212,6 +210,18 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("OutboxState", "Passes");
});
+
+ modelBuilder.Entity("MassTransit.EntityFrameworkCoreIntegration.OutboxMessage", b =>
+ {
+ b.HasOne("MassTransit.EntityFrameworkCoreIntegration.OutboxState", null)
+ .WithMany()
+ .HasForeignKey("OutboxId");
+
+ b.HasOne("MassTransit.EntityFrameworkCoreIntegration.InboxState", null)
+ .WithMany()
+ .HasForeignKey("InboxMessageId", "InboxConsumerId")
+ .HasPrincipalKey("MessageId", "ConsumerId");
+ });
#pragma warning restore 612, 618
}
}
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Fitnet.Passes.DataAccess.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Fitnet.Passes.DataAccess.csproj
index 37068a43..e829a786 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Fitnet.Passes.DataAccess.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.DataAccess/Fitnet.Passes.DataAccess.csproj
@@ -1,9 +1,8 @@
-
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.IntegrationEvents/Fitnet.Passes.IntegrationEvents.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.IntegrationEvents/Fitnet.Passes.IntegrationEvents.csproj
index f5c1f751..1cd4d0d4 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.IntegrationEvents/Fitnet.Passes.IntegrationEvents.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Fitnet.Passes.IntegrationEvents/Fitnet.Passes.IntegrationEvents.csproj
@@ -1,12 +1,6 @@
-
-
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/Fitnet.Passes.IntegrationTests.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/Fitnet.Passes.IntegrationTests.csproj
index ebc285ae..87667c87 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/Fitnet.Passes.IntegrationTests.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/Fitnet.Passes.IntegrationTests.csproj
@@ -5,16 +5,12 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/RegisterPass/RegisterPassTests.cs b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/RegisterPass/RegisterPassTests.cs
index 039d521c..0e750f73 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/RegisterPass/RegisterPassTests.cs
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Passes/Tests/Fitnet.Passes.IntegrationTests/RegisterPass/RegisterPassTests.cs
@@ -23,7 +23,9 @@ public RegisterPassTests(FitnetWebApplicationFactory applicationInMemor
}
[Fact]
+#pragma warning disable S2699
internal async Task Given_contract_signed_event_Then_should_register_pass()
+#pragma warning restore S2699
{
// Arrange
var @event = ContractSignedEventFaker.Create();
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Reports/Fitnet.Reports/Fitnet.Reports.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Reports/Fitnet.Reports/Fitnet.Reports.csproj
index e5439ddd..7f30106c 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Reports/Fitnet.Reports/Fitnet.Reports.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Reports/Fitnet.Reports/Fitnet.Reports.csproj
@@ -3,14 +3,13 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/Reports/Tests/Fitnet.Reports.IntegrationTests/Fitnet.Reports.IntegrationTests.csproj b/Chapter-3-microservice-extraction/Fitnet/Src/Reports/Tests/Fitnet.Reports.IntegrationTests/Fitnet.Reports.IntegrationTests.csproj
index 79fdfdf3..24fb8b6a 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/Reports/Tests/Fitnet.Reports.IntegrationTests/Fitnet.Reports.IntegrationTests.csproj
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/Reports/Tests/Fitnet.Reports.IntegrationTests/Fitnet.Reports.IntegrationTests.csproj
@@ -5,13 +5,10 @@
-
-
-
-
-
-
-
+
+
+
+
diff --git a/Chapter-3-microservice-extraction/Fitnet/Src/nuget.config b/Chapter-3-microservice-extraction/Fitnet/Src/nuget.config
index d4fe5249..d167d5f4 100644
--- a/Chapter-3-microservice-extraction/Fitnet/Src/nuget.config
+++ b/Chapter-3-microservice-extraction/Fitnet/Src/nuget.config
@@ -7,11 +7,17 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
\ No newline at end of file