Modular .NET library ecosystem bridging OOP and Functional Programming: Result monads, discriminated unions, a rules engine, and more.
Every abstraction earns its place. The primitives are composable, null-safe and type-driven, with little ceremony or boilerplate.
Chain operations with Result<T> and Error, so exceptions do not leak across boundaries.
First-class Any<T1,T2,...> types bring exhaustive pattern matching to C# without the ceremony.
Build validation and business logic with .And() .Or() .Next(). The rules stay readable, testable and reusable.
Full nullable annotations with TreatWarningsAsErrors, so null reference bugs surface at compile time.
EntityBase<TId>, domain events, EF Core interceptors, and pagination out of the box.
Take only what you need. Each package is published on its own and all of them share one version number. Or grab the meta-package for the core functional modules.
Targeting .NET 11, .NET 10, .NET 9, .NET 8, netstandard2.1, and netstandard2.0. Central package management keeps versions consistent.
Railway-oriented error handling with Result<T>. Chain operations without throwing exceptions.
Structured Error values with codes and metadata, instead of exceptions as control flow.
Explicit optionals with Maybe<T>. The absence of a value shows up in your type signatures.
Discriminated unions Any<T1,T2> for exhaustive pattern matching without class hierarchies.
String, GUID, and collection utilities that should be in the BCL but aren't.
Extensions · Helpers[StringEnum] source generator for AOT-safe wire names and metadata that JSON, binding, OpenAPI and EF Core share.
Composable rule engine with .And() .Or() .Next() for readable, testable validation trees.
CQRS pipeline behaviors for the Mediator source generator: validation, logging, exception handling, caching, locking and transactions.
ValidationBehavior · LoggingBehaviorEntityBase<TId> with domain event support, the foundation for DDD aggregates.
EF Core interceptors for domain events, soft delete, auditing and slow queries, plus keyset and offset pagination.
Interceptors · KeysetPaginateAsyncGlobalExceptionHandler, ResultEndpointFilter, problem details mapping, enum binding and API versioning.
Enum convention schemas for Microsoft.AspNetCore.OpenApi on .NET 10. Use it or the Swashbuckle package, never both.
Swagger versioning, schema ids, security schemes and enum convention schemas for Swashbuckle 10.
AddSwagger · UseVersionableSwaggerHttpClient extensions that return Result<T> instead of throwing on non-2xx responses.
Pre-configured System.Text.Json options with enum conventions, polymorphic and multi-format date converters.
ASP.NET Core middleware for structured request/response body logging with configurable filtering.
Middleware · ILoggerGCP Secret Manager integration that surfaces secrets as standard IConfiguration entries.
Testable IDateTimeProvider. Swap real time for fixed time in unit tests without static hacks.
Strongly-typed deep copy via ICloneable<T>. Copies are explicit and type-safe, and nothing returns object.
Model-first validation returning Result<T> natively. It uses no reflection, expression trees or deferred builds.
Modular resilience policies (Retry, Timeout, CircuitBreaker, Fallback) that compose through a fluent API.
Partial success: Left (errors), Right (value) or Both (errors and a value).
Source-generated Minimal API endpoint discovery and grouping. No reflection, Native AOT safe.
IEndpoint · IEndpointGroup · AnalyzersAttribute-based, source-generated service registration and decoration, keyed services included.
[RegisterScoped] · [Decorates] · Analyzers23 per-package skills for Claude Code, Cursor, Codex, and 50+ compatible AI agents. Install once and every agent in your workflow gets structured, accurate knowledge of each package's API.
npx skills add senrecep/CSharpEssentials
npx skills add https://senrecep.github.io/CSharpEssentials
After install, your AI assistant knows the full API surface of each package: types, methods, patterns and idiomatic usage, so it does not have to guess.