Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 23 additions & 9 deletions FlowMediator/FlowMediator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,43 @@
<PropertyGroup>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.2.0</Version>
<Version>2.0.0</Version>
<PackageId>FlowMediator</PackageId>
<Authors>berk2k</Authors>
<Description>
FlowMediator is a lightweight mediator library with pipeline behaviors and domain events for .NET 8/9.
Ideal for hobby projects, or learning CQRS patterns without the complexity of bigger frameworks.
Provides request/response messaging, pipeline behaviors (logging, validation), and EF Core domain event support.
FlowMediator is an opinionated mediator library for explicit application flow in .NET 8 and .NET 9.

It provides clear separation between request-based application flow (SendAsync)
and event-based side effects (PublishAsync), with pipeline support for CQRS-style
applications and explicit event handling.

</Description>
<PackageTags>mediator cqrs pipeline domain-events .net lightweight hobby</PackageTags>

<PackageTags>
mediator cqrs application-flow events ddd
</PackageTags>

<RepositoryUrl>https://github.com/berk2k/FlowMediator</RepositoryUrl>
<PackageProjectUrl>https://github.com/berk2k/FlowMediator</PackageProjectUrl>
<PackageReleaseNotes>
v1.2.0 - Added Domain Event support with EF Core integration. Improved README and documentation.
</PackageReleaseNotes>
<PackageReadmeFile>README.md</PackageReadmeFile>
v2.0.0
- Explicit separation between Send (application flow) and Publish (events)
- Events are no longer treated as requests
- Multiple event handlers supported
- Pipeline applies only to SendAsync
- Event handlers are executed sequentially and synchronously
- Breaking change: migration from v1.x is required
</PackageReleaseNotes>

<PackageReadmeFile>README.NUGET.md</PackageReadmeFile>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.8" />
<None Include="..\README.md" Pack="true" PackagePath="\" />
<None Include="..\README.NUGET.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
62 changes: 62 additions & 0 deletions README.NUGET.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
FlowMediator is a lightweight, opinionated mediator library for .NET 8 and .NET 9.

It simplifies **CQRS-style application flow** by explicitly separating
request-based operations (commands and queries)
from event-driven side effects.

FlowMediator provides request/response messaging and pipeline behaviors
with a predictable and transparent execution model.

---

Use FlowMediator when you want:

- Clear separation between application flow and events
- Simple request/response messaging without boilerplate
- Predictable mediator behavior
- A lightweight alternative to generic mediator frameworks


## Installation

```bash
dotnet add package FlowMediator
```

## Core Usage
### Command / Query (SendAsync)

``` csharp
var user = await mediator.SendAsync(new GetUserByIdQuery(1));
```
- Single handler
- Pipeline-enabled (logging, validation, etc.)

### Events (PublishAsync)
``` csharp
await mediator.PublishAsync(new UserCreatedEvent());
```

- Multiple handlers supported
- No response
- Side-effect oriented

Event handlers are executed sequentially and synchronously by default.

## Key Concepts
- SendAsync -> application flow (commands / queries)
- PublishAsync -> event notifications
- Events are not treated as requests
- Pipelines apply only to SendAsync

## Documentation
Full documentation, migration guide, and roadmap are available on GitHub:
👉 https://github.com/berk2k/FlowMediator

License: MIT






Loading