{"id":49915592,"url":"https://github.com/magmablinker/axent","last_synced_at":"2026-05-16T16:05:53.157Z","repository":{"id":340553409,"uuid":"1165943335","full_name":"magmablinker/Axent","owner":"magmablinker","description":"Axent is a source-generated CQRS library for modern .NET with typed pipelines and ASP.NET Core integration.","archived":false,"fork":false,"pushed_at":"2026-05-06T09:26:34.000Z","size":169,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-06T10:36:59.499Z","etag":null,"topics":["aspnetcore","cqrs","csharp","dotnet","mediator","nuget-package","pipeline","sourcegenerator"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magmablinker.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-24T17:57:57.000Z","updated_at":"2026-05-06T09:25:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/magmablinker/Axent","commit_stats":null,"previous_names":["magmablinker/axent"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/magmablinker/Axent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magmablinker%2FAxent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magmablinker%2FAxent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magmablinker%2FAxent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magmablinker%2FAxent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magmablinker","download_url":"https://codeload.github.com/magmablinker/Axent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magmablinker%2FAxent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33109461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aspnetcore","cqrs","csharp","dotnet","mediator","nuget-package","pipeline","sourcegenerator"],"created_at":"2026-05-16T16:05:52.104Z","updated_at":"2026-05-16T16:05:53.153Z","avatar_url":"https://github.com/magmablinker.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Axent\n\n![Axent Logo](https://raw.githubusercontent.com/magmablinker/Axent/refs/heads/main/logo/axent-logo.svg)\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/magmablinker/axent/publish-nuget.yml)\n[![NuGet](https://img.shields.io/nuget/v/Axent.Core)](https://www.nuget.org/packages/Axent.Core)\n[![Downloads](https://img.shields.io/nuget/dt/Axent.Core.svg)](https://www.nuget.org/packages/Axent.Core/)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=magmablinker_Axent\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=magmablinker_Axent)\n\n**Axent** is a source-generated CQRS library for modern .NET with typed pipelines and ASP.NET Core integration. It is currently ~2x faster than [MediatR (v12.5)](https://github.com/LuckyPennySoftware/MediatR) with fewer allocations.\n\n---\n\n## Why Axent?\n* 🚀 Fast: source generated dispatch with zero reflection\n* 🧩 Minimal: very little setup\n* 🧠 Strongly typed, extensible pipelines for cross-cutting concerns\n* 🌐 First class ASP.NET Core integration\n* ⚙️ Built for modern .NET (8+)\n\n## 📦 Features\n\n- Minimal setup and boilerplate\n- Source-generated dispatch — no reflection at runtime\n- Typed pipelines with support for generic and request-specific pipes\n- Separate marker interfaces for commands and queries (`ICommand\u003cTResponse\u003e`, `IQuery\u003cTResponse\u003e`)\n- Built-in support for transactions, logging, and error handling via pipeline options\n- ASP.NET Core integration\n- .NET 8+ optimized\n\n---\n\n## Prerequisites\n\n- .NET 8 or later\n\n## 🚀 Getting Started\n\n#### 1. Install Packages\n```shell\ndotnet add package Axent.Core\ndotnet add package Axent.Extensions.AspNetCore\n```\n\n#### 2. Register Services\n```csharp\nbuilder.Services.AddAxent()\n    .AddRequestHandlers(AssemblyProvider.Current);\n```\n\n#### 3. Create a Request and Handler\n- IQuery\u003cTResponse\u003e for read operations\n- ICommand\u003cTResponse\u003e for write operations\n- IRequest\u003cTResponse\u003e if you don't want to differentiate\n- IRequestHandler\u003cTRequest, TResponse\u003e to handle them\n\n```csharp\nusing Axent.Abstractions.Models;\nusing Axent.Abstractions.Requests;\nusing Axent.Abstractions.Services;\n\nnamespace Axent.ExampleApi;\n\ninternal sealed record ExampleQuery(string Message) : IQuery\u003cUnit\u003e;\n\ninternal sealed class ExampleQueryHandler : IRequestHandler\u003cExampleQuery, Unit\u003e\n{\n    private readonly ILogger\u003cExampleQueryHandler\u003e _logger;\n\n    public ExampleQueryHandler(ILogger\u003cExampleQueryHandler\u003e logger)\n    {\n        _logger = logger;\n    }\n\n    public ValueTask\u003cResponse\u003cUnit\u003e\u003e HandleAsync(RequestContext\u003cExampleQuery\u003e context, CancellationToken cancellationToken = default)\n    {\n        _logger.LogInformation(\"Message from request '{Message}'\", context.Request.Message);\n        return ValueTask.FromResult(Response.Success(Unit.Value));\n    }\n}\n```\n\n#### 4. Send a Request\nInject ISender into endpoints or application services.\n\n```csharp\napp.MapGet(\"/api/example\", async (ISender sender, CancellationToken cancellationToken) =\u003e\n{\n    var response = await sender.SendAsync(new ExampleQuery(\"Hello World!\"), cancellationToken);\n    return response.ToResult();\n});\n```\n---\n\nAlternatively using the template\n```shell\ndotnet new install Axent.Templates\ndotnet new axent-api\n```\n\n## 📖 Docs\nTo learn more about the features of Axent, checkout the [documentation](https://github.com/magmablinker/Axent/tree/main/docs)\n\n## 📊 Benchmarks\n\n### Axent (Source Generated Dispatch)\n```\nBenchmarkDotNet v0.14.0, Windows 11 (10.0.26200.7840)\nUnknown processor\n.NET SDK 10.0.200-preview.0.26103.119\n  [Host]     : .NET 8.0.23 (8.0.2325.60607), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI [AttachedDebugger]\n  DefaultJob : .NET 8.0.23 (8.0.2325.60607), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI\n```\n| Method                                    |     Mean |    Error |   StdDev | Ratio | RatioSD |   Gen0 | Allocated | Alloc Ratio |\n|-------------------------------------------|---------:|---------:|---------:|------:|--------:|-------:|----------:|------------:|\n| \u0026#39;SendAsync (cold)\u0026#39;                | 36.74 ns | 0.741 ns | 1.702 ns |  1.00 |    0.06 | 0.0196 |     328 B |        1.00 |\n| \u0026#39;SendAsync (warm, same instance)\u0026#39; | 33.97 ns | 0.423 ns | 0.353 ns |  0.93 |    0.04 | 0.0181 |     304 B |        0.93 |\n\n\n### MediatR (v12.5.0)\n```\nBenchmarkDotNet v0.14.0, Windows 11 (10.0.26200.7840)\nUnknown processor\n.NET SDK 10.0.200-preview.0.26103.119\n  [Host]     : .NET 8.0.23 (8.0.2325.60607), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI [AttachedDebugger]\n  DefaultJob : .NET 8.0.23 (8.0.2325.60607), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI\n```\n| Method                               |     Mean |    Error |   StdDev |   Gen0 | Allocated |\n|--------------------------------------|---------:|---------:|---------:|-------:|----------:|\n| \u0026#39;Send (cold)\u0026#39;                | 79.03 ns | 1.526 ns | 2.713 ns | 0.0257 |     432 B |\n| \u0026#39;Send (warm, same instance)\u0026#39; | 79.21 ns | 1.566 ns | 3.783 ns | 0.0243 |     408 B |\n\n## 🤝 Contributing\nContributions are welcome.\nIf you find a bug, have an improvement, or want to propose a feature:\n1. Open an issue\n2. Start a discussion\n3. Submit a pull request\n\n## 📄 License\nThis project is licensed under the Apache License 2.0. See [`LICENSE`](https://github.com/magmablinker/Axent/blob/main/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagmablinker%2Faxent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagmablinker%2Faxent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagmablinker%2Faxent/lists"}