Skip to content

Vertical Slice Architecture: rebuild the sample on net10.0 - #2244

Open
vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/70253-vertical-slice-architecture-aspnet-core
Open

vladimir-pecanac-main wants to merge 1 commit into
CodeMazeBlog:mainfrom
vladimir-pecanac-main:seo/70253-vertical-slice-architecture-aspnet-core

Conversation

@vladimir-pecanac-main

Copy link
Copy Markdown
Collaborator

Rebuilds csharp-architectural-patterns/VerticalSliceArchitecture as the sample for the updated article "Vertical Slice Architecture in C#: A Step-by-Step Example" (https://code-maze.com/vertical-slice-architecture-aspnet-core/).

  • The net8.0 games-and-consoles sample (MediatR 12.2.0, AutoMapper 13.0.1, EF Core InMemory 8.0.3, Swashbuckle 6.5.0, controllers, a shared ServiceManager) is replaced by an event ticketing minimal API on net10.0: three feature slices (GetEventAvailability, ReserveTickets, ListAvailableEvents), an Event entity that guards its capacity rule, a Result type mapped to problem details, built-in validation, EF Core SQLite 10.0.12.
  • Tests: two slice tests against SQLite in memory and one NetArchTest.Rules architecture test that keeps features apart (xunit.v3.mtp-off 4.0.1, Microsoft.NET.Test.Sdk 18.10.1).
  • Classic EventTicketing.sln for the CI, launch profile on port 5000 to match the .http file, a folder .gitignore for the SQLite file.
  • Removes the NU1903 high-severity advisory on AutoMapper 13.0.1 and the nullability warnings.

Local run with the CI's commands: dotnet build EventTicketing.sln --configuration Release 0 warnings, 0 errors; dotnet test EventTicketing.sln --configuration Release --no-build --filter "FullyQualifiedName!~Live" Passed: 3.

Touches only this folder. Merge together with the article's publish.

… API on net10.0

Replace the net8.0 games-and-consoles sample (MediatR 12.2.0, AutoMapper 13.0.1,
EF Core InMemory, Swashbuckle, a shared ServiceManager) with the article's build:
one minimal API project with three feature slices, an Event entity that guards
its capacity rule, a Result type mapped to problem details, built-in validation,
and EF Core SQLite 10.0.12. Tests run the slices against SQLite in memory and an
architecture test keeps features from depending on each other.

Classic EventTicketing.sln for the CI, launch profile on port 5000 so the .http
file works from an IDE, and a folder .gitignore for the SQLite file. Removes the
NU1903 advisory on AutoMapper 13.0.1 and the nullability warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant