Skip to content

TailoredApps .NET Shared Components

License: MIT GitHub

Welcome to the documentation of TailoredApps Shared Components — a set of reusable .NET libraries that accelerate the development of professional web applications. Each library solves one specific problem and is designed for testability, extensibility, and integration with the ASP.NET Core + mediator ecosystem.


Libraries

Library NuGet Description
DateTime TailoredApps.Shared.DateTime IDateTimeProvider abstraction for mocking time in tests (DateTime, DateTimeOffset) on top of System.TimeProvider
Email TailoredApps.Shared.Email SMTP provider, email template builder, console mode
Email.Models TailoredApps.Shared.Email.Models MailMessage data model
Email.Office365 TailoredApps.Shared.Email.Office365 Sending via Microsoft Graph API (IMAP OAuth2)
EntityFramework TailoredApps.Shared.EntityFramework Unit of Work pattern on EF Core with auditing and hooks
EntityFramework.UnitOfWork.WebApiCore TailoredApps.Shared.EntityFramework.UnitOfWork.WebApiCore Automatic transactions via ASP.NET Core filter
EntityFramework.UnitOfWork.MinimalApi TailoredApps.Shared.EntityFramework.UnitOfWork.MinimalApi Automatic transactions for minimal APIs through an endpoint filter
ExceptionHandling TailoredApps.Shared.ExceptionHandling Middleware and filter for exception handling in Web API
ExceptionHandling.MinimalApi TailoredApps.Shared.ExceptionHandling.MinimalApi Exception handling and FluentValidation for minimal APIs (endpoint filters), NativeAOT-compatible
Mediator TailoredApps.Shared.Mediator Pipeline behaviors: Logging, Validation, Caching, Fallback, Retry
Mediator.Caching TailoredApps.Shared.Mediator.Caching ICachableRequest marker interface for caching requests
Mediator.Email TailoredApps.Shared.Mediator.Email SendMail command + handler — email via the mediator pipeline
Mediator.ML TailoredApps.Shared.Mediator.ML Image classification via ML.NET in mediator pipelines
Mediator.PagedRequest TailoredApps.Shared.Mediator.PagedRequest Base mediator request with pagination and sorting
Payments TailoredApps.Shared.Payments Payment gateway abstraction — IPaymentService + IPaymentProvider
Payments.Provider.Adyen TailoredApps.Shared.Payments.Provider.Adyen Adyen integration
Payments.Provider.CashBill TailoredApps.Shared.Payments.Provider.CashBill CashBill integration
Payments.Provider.HotPay TailoredApps.Shared.Payments.Provider.HotPay HotPay integration
Payments.Provider.PayNow TailoredApps.Shared.Payments.Provider.PayNow PayNow (mBank) integration
Payments.Provider.PayU TailoredApps.Shared.Payments.Provider.PayU PayU integration
Payments.Provider.Przelewy24 TailoredApps.Shared.Payments.Provider.Przelewy24 Przelewy24 integration
Payments.Provider.Revolut TailoredApps.Shared.Payments.Provider.Revolut Revolut Pay integration
Payments.Provider.Stripe TailoredApps.Shared.Payments.Provider.Stripe Stripe Checkout integration
Payments.Provider.Tpay TailoredApps.Shared.Payments.Provider.Tpay Tpay integration
Querying TailoredApps.Shared.Querying Base query classes: QueryBase, PagedAndSortedQuery, IPagedResult
WebApi TailoredApps.Shared.WebApi Production Web API defaults: OpenTelemetry (metrics/tracing/logs via OTLP), health checks, HTTP resilience

Demo application

All the libraries together, in a running application: Sample service and integration tests - a Web API shop (samples/: contract, logic and host, with ForkForward.Mediator and ForkForward.Mapper) with faked payment gateways that runs with no account and no network, and tests that drive it over HTTP in CI.


Upgrading from 1.x

Moving from 1.x to 2.0? The changes required in application code - handling a failing payment gateway, the required members of PaymentRequest, Tpay and Adyen webhooks - are collected on the Upgrading to 2.0 page.

The 3.0 line is in a test phase (3.0.0-preview.N): the mediator libraries move to ForkForward.Mediator and are renamed from TailoredApps.Shared.MediatR* to TailoredApps.Shared.Mediator*. What to change in an application: Upgrading to 3.0.


Target frameworks

From version 2.0 the libraries ship for net10.0 and net11.0; older frameworks are served by the 1.x packages (1.6.x). The net11.0 assets are compiled with runtime async. Details, limitations and how to switch it off: Target frameworks and runtime async.


Quick Start

# Install the chosen library
dotnet add package TailoredApps.Shared.Mediator
dotnet add package TailoredApps.Shared.EntityFramework
dotnet add package TailoredApps.Shared.Payments

Full documentation for each library — including code examples, DI registration, and ready-made AI agent prompts — is available in the Libraries section in the side menu.


Contributing

Before adding a new library, read the contributing guidelines and DOCUMENTATION_RULE.

Every new library must have a documentation page — PRs without one will be rejected.