JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi 11.2.1

dotnet add package JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi --version 11.2.1
                    
NuGet\Install-Package JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi -Version 11.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi" Version="11.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi" Version="11.2.1" />
                    
Directory.Packages.props
<PackageReference Include="JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi --version 11.2.1
                    
#r "nuget: JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi, 11.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi@11.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi&version=11.2.1
                    
Install as a Cake Addin
#tool nuget:?package=JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi&version=11.2.1
                    
Install as a Cake Tool

What is the Shared Kernel Project?

The purpose of the Shared Kernel project is to define a common set of abstractions and building blocks that promote Domain-Driven Design (DDD) and Clean Architecture in .NET.

It intentionally remains persistence-agnostic, allowing aggregates to be implemented with or without event sourcing.

Give it a star ⭐

Loving it? Please show your support by giving this project a star!

NuGets ready to use: ⚙️

  • JordiAragonZaragoza.SharedKernel - NuGet JordiAragonZaragoza.SharedKernel.Contracts - NuGet
  • JordiAragonZaragoza.SharedKernel.Domain - NuGet JordiAragonZaragoza.SharedKernel.Domain.Contracts - NuGet
  • JordiAragonZaragoza.SharedKernel.Application - NuGet JordiAragonZaragoza.SharedKernel.Application.Contracts - NuGet JordiAragonZaragoza.SharedKernel.Application.Contracts.Integration - NuGet
  • JordiAragonZaragoza.SharedKernel.Infrastructure - NuGet JordiAragonZaragoza.SharedKernel.Infrastructure.EntityFramework - NuGet JordiAragonZaragoza.SharedKernel.Infrastructure.EventStore - NuGet
  • JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi - NuGet JordiAragonZaragoza.SharedKernel.Presentation.HttpRestfulApi.Contracts - NuGet
  • JordiAragonZaragoza.SharedKernel.Presentation.Integration - NuGet JordiAragonZaragoza.SharedKernel.Presentation.Integration.Contracts - NuGet

How to debug: 🐛

  • You will need the latest Visual Studio 2022 and the latest .NET Core SDK (at least .NET 10 SDK)
  • All the projects library are contained in JordiAragonZaragoza.SharedKernel.sln solution file.

Example of Use 🚨

  • JordiAragonZaragoza.Cinema A showcase project demonstrating a fictional cinema management system built with .NET.

    The solution follows Domain-Driven Design (DDD) and Event Sourcing principles, and adopts a Microservices Architecture with an Event-Driven approach and Vertical Slice Architecture.

Used libraries: ⚒️

  • Entity Framework
  • KurrentDB.Client
  • MediatR
  • MassTransit
  • FastEndpoints
  • Ardalis.Result
  • Ardalis.Specification
  • Ardalis.SmartEnums
  • Ardalis.GuardClauses
  • FluentValidator
  • Serilog
  • StyleCop & SonarAnalyzer

Brief explanation per project (Pending to complete) 🤓

SharedKernel and Contracts

  • Dependency Injection. Allow auto register services using markup interfaces.

Domain and Contracts

  • Common contracts and base implementations to flow DDD principles like: DomainEvents, ApplicationEvents, ValueObjects, Entities, Repository, BusinessRulesValidations and other DDD building blocks.

Application and Contracts

  • Application common contracts and base implementation for EventBus, UnitOfWork and CQRS...
  • Common MediatR pipelines implementation
  • Integration contacts and base implementation to be used in EventBus
  • Common EventBus implementation using MassTransit

Infrastructure and Contracts

  • EntityFramework base implementation to allow auditing and outbox to dispatch domain events notifications.
  • BaseCachedRepository is done using ICacheService abstraction.
  • MassTransitEventBus base implementation.

Presentation and Contracts

  • HttpRestfulApi building blocks. Like BaseApiController, ExceptionMiddleware, CurrentUserService and ResponseBuilder for ProblemDetails.

Presentation Integration and Contracts

  • Integration Bus building blocks. Like IntegrationEventHandler

Testing 🧪

GitHub workflow CI with SonarCloud integration

SonarCloud

Resources and Inspiration 🙏

Special thanks to all these authors for sharing their knowledge and expertise:

  • <a href="https://github.com/ardalis/CleanArchitecture" target="_blank">Ardalis: Clean Architecture</a>
  • <a href="https://github.com/jasontaylordev/CleanArchitecture" target="_blank">Jason Taylor: Clean Architecture</a>
  • <a href="https://www.oreilly.com/library/view/implementing-domain-driven-design/9780133039900/" target="_blank">Vaughn Vernon: Implementing Domain-Driven Design (book)</a>
  • <a href="https://kalele.io/books/ddd-destilado/" target="_blank">Vaughn Vernon: Domain-Driven Design Destilado (book)</a>
  • <a href="https://www.amazon.com/Hands-Domain-Driven-Design-NET-ebook/dp/B07C5WSR9B" target="_blank">Alexey Zimarev: Hands-on Domain-Driven Design (book)</a>
  • <a href="https://github.com/oskardudycz/EventSourcing.NetCore" target="_blank">Oskar Dudycz: EventSourcing .NET</a>
  • <a href="https://eventuous.dev/" target="_blank">Alexey Zimarev: Eventuous</a>
  • <a href="https://github.com/kgrzybek/sample-dotnet-core-cqrs-api" target="_blank">Kamil Grzybek: Sample .NET Core REST API CQRS</a>
  • <a href="https://github.com/kgrzybek/modular-monolith-with-ddd" target="_blank">Kamil Grzybek: Modular Monolith With DDD</a>
  • <a href="https://www.youtube.com/watch?v=Lw04HRF8ies" target="_blank">NDC Oslo: Udi Dahan - Talk Session: CQRS pitfalls and patterns</a>
  • <a href="https://www.youtube.com/watch?v=26xrX113KZc" target="_blank">Explore DDD: Mauro Servienti - Talk Session: Welcome to the (State) Machine</a>
  • <a href="https://www.youtube.com/watch?v=KkzvQSuYd5I" target="_blank">Explore DDD: Mauro Servienti - Talk Session: All Our Aggregates Are Wrong</a>
  • <a href="https://www.youtube.com/watch?v=tVnIUZbsxWI" target="_blank">NDC Oslo: Adam Ralph - Talk Session: Finding your service boundaries - a practical guide</a>
  • <a href="https://www.youtube.com/watch?v=fGm62ra_mQ8" target="_blank">Øredev: Alberto Brandolini - Talk Session: 100,000 Orange Stickies Later</a>
  • <a href="https://www.confluent.io/events/kafka-summit-london-2024/event-modeling-anti-patterns/" target="_blank">KS2024: Oskar Dudycz - Talk Session: Event Modeling Anti-patterns</a>
  • <a href="https://www.youtube.com/watch?v=kPV1SkdSnhE" target="_blank">Vladimir Khorikov: DDD in a nutshell</a>
  • <a href="https://odysee.com/@sunnyAtticSoftware:a?view=content" target="_blank">Diego Martin: SunnyAttic Software Videos</a>
  • <a href="https://www.youtube.com/watch?v=SUiWfhAhgQw" target="_blank">Jimmy Bogard: Vertical Slice Architecture</a>
  • <a href="https://www.youtube.com/@CodeOpinion" target="_blank">CodeOpinion: Youtube Channel</a>
  • <a href="https://www.youtube.com/@amantinband" target="_blank">Amichai Mantinband: Youtube Channel</a>
  • <a href="https://www.youtube.com/@MilanJovanovicTech" target="_blank">Milan Jovanović: Youtube Channel</a>

Versions

The main branch is now on .NET 10 The following previous versions are available:

About: 🧐

The SharedKernel Project was developed by <a href="https://www.linkedin.com/in/jordiaragonzaragoza/" target="_blank">Jordi Aragón Zaragoza</a>

License: 👮‍♂️

Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Creative Commons License

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.2.1 124 3/18/2026
11.1.0 144 1/23/2026
11.0.0 126 1/23/2026
10.1.0 243 10/6/2025
10.0.0 222 2/23/2025
9.1.0 199 11/16/2024
9.0.0 202 10/27/2024