Firefly for .NET
Familiar hosting. Focused application code.
Firefly for .NET connects application infrastructure through ASP.NET Core’s hosting and dependency injection model. Keep use cases in typed handlers and compose the modules your service needs.
- .NET 10
- ASP.NET Core
- C#
The building blocks,
explained.
Explore what this implementation provides, with a direct path to the code behind each capability.
- Validated command dispatch
Validate and authorize commands before resolving and invoking their registered handlers.
Explore this capability- Attribute-based sagas
Discover annotated saga steps, follow declared dependencies and invoke compensating methods after a failure.
Explore this capability- Structured HTTP errors
Translate application exceptions into consistent HTTP error responses with status, trace and correlation information.
Explore this capability- In-process caching
Read, write and invalidate cached values through the MemoryCache adapter, including prefix-based eviction.
Explore this capability- In-process event delivery
Publish event envelopes to destination channels and consume them asynchronously inside the application.
Explore this capability
From the source
See the ideas
in real code.
Verbatim Orders sample query handler, including its real imports: asynchronous repository lookup and nullable DTO projection.
View the complete sourceusing FireflyFramework.Cqrs.Queries;
using FireflyFramework.Samples.OrdersService.Core.Mappers;
using FireflyFramework.Samples.OrdersService.Interfaces.Dtos.V1;
using FireflyFramework.Samples.OrdersService.Models.Repositories;
using ExecutionContext = FireflyFramework.Cqrs.Context.ExecutionContext;
namespace FireflyFramework.Samples.OrdersService.Core.Services.Orders.V1;
public sealed class GetOrderHandler(IOrderRepository repository) : IQueryHandler<GetOrderQuery, OrderDto?>
{
public async Task<OrderDto?> HandleAsync(GetOrderQuery query, ExecutionContext context, CancellationToken ct = default)
{
var entity = await repository.GetAsync(query.OrderId, ct).ConfigureAwait(false);
return entity?.ToDto();
}
}
Follow the Orders service.
See how a real sample connects its application, domain, and infrastructure. Read the source alongside its guide and tests.
Read the migration cookbook
Map familiar Java and Spring concepts onto the repository’s .NET service structure.
Follow this stepInspect the Orders startup
See AddFireflyCore and the sample repository registered in an ASP.NET Core application.
Follow this step
Keep exploring.
Follow the projects and references connected to Firefly for .NET.
