Skip to content

Prerequisites and Setup

Please verify the following items before starting the tutorial.

ToolVersionPurpose
.NET SDK10.0 or higherBuild and run
VS CodeLatestCode editing
C# Dev KitLatestC# development support

You should be familiar with the following concepts to study this tutorial:

ConceptLevelDescription
C# GenericsBasicBasic generic syntax like List<T>, where T : class
InterfacesBasicInterface definition, implementation, polymorphism
Record typesBasicrecord class, sealed record, positional record
Mediator patternOptionalNeeded from Part 2 onward (not required for Part 1)
Terminal window
# Clone the repository
git clone https://github.com/hhko/Functorium.git
cd Functorium
# Build the tutorial
dotnet build Docs.Site/src/content/docs/tutorials/usecase-pipeline/usecase-pipeline.slnx
# Run tutorial tests
dotnet test --solution Docs.Site/src/content/docs/tutorials/usecase-pipeline/usecase-pipeline.slnx
# Build the entire solution
dotnet build Functorium.slnx

The projects in this tutorial are divided into two types:

TypePartReferencesDescription
StandalonePart 1, 2 (Sections 2-3), 3LanguageExt.Core onlyFor concept learning, independently runnable
Functorium ReferencePart 2 (Section 1), 4, 5Functorium.csprojPractical application, uses Pipeline/Usecase
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="LanguageExt.Core" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\Src\Functorium\Functorium.csproj" />
</ItemGroup>
</Project>

It is recommended to study Parts 1-3 in order. Parts 4-5 can be studied freely after completing Part 3.

Q1: Can Part 1 be studied without Mediator pattern knowledge?

Section titled “Q1: Can Part 1 be studied without Mediator pattern knowledge?”

A: Yes. Part 1 covers only C# generic variance (covariance/contravariance/invariance), so Mediator pattern knowledge is not needed. IPipelineBehavior first appears in Part 2, so understanding the basics of the Mediator pattern by then is sufficient.

Q2: What is the difference between Standalone and Functorium Reference projects?

Section titled “Q2: What is the difference between Standalone and Functorium Reference projects?”

A: Standalone projects reference only LanguageExt.Core and are independently runnable for concept learning. Functorium Reference projects reference Functorium.csproj and are used for practical Pipeline and Usecase implementation. Parts 1-3 primarily use Standalone, while Parts 4-5 use Functorium Reference projects.

Q3: Can I follow the tutorial with a .NET SDK version earlier than 10.0?

Section titled “Q3: Can I follow the tutorial with a .NET SDK version earlier than 10.0?”

A: This tutorial uses C# 11’s static abstract members and modern record syntax. static abstract is supported from .NET 7 onward, but since the project build settings target .NET 10, .NET SDK 10.0 or higher is recommended.


The following section examines the overall structure of Mediator Pipelines and the capabilities each Pipeline requires from the response type.

Section 0.3: Usecase Pipeline Architecture Overview