Mvp24Hours.WebAPI 9.1.21

dotnet add package Mvp24Hours.WebAPI --version 9.1.21
                    
NuGet\Install-Package Mvp24Hours.WebAPI -Version 9.1.21
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mvp24Hours.WebAPI" Version="9.1.21" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mvp24Hours.WebAPI" Version="9.1.21" />
                    
Directory.Packages.props
<PackageReference Include="Mvp24Hours.WebAPI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Mvp24Hours.WebAPI --version 9.1.21
                    
#r "nuget: Mvp24Hours.WebAPI, 9.1.21"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Mvp24Hours.WebAPI@9.1.21
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Mvp24Hours.WebAPI&version=9.1.21
                    
Install as a Cake Addin
#tool nuget:?package=Mvp24Hours.WebAPI&version=9.1.21
                    
Install as a Cake Tool

What's new?

NET9

9.1.210 (January 2026)

  • Fixed NuGet package versions across all projects;
  • Updated dependencies for .NET 9 compatibility;
  • Removed obsolete DelegatingHandlers and TypedHttpClient files;

9.1.200 (January 2026) ๐Ÿš€ Major Release

โญ Complete CQRS Library (Mvp24Hours.Infrastructure.Cqrs)

  • Full CQRS pattern implementation with custom Mediator (MediatR replacement)
  • IMediator, ISender, IPublisher - main interfaces
  • IMediatorCommand<T> and IMediatorQuery<T> - typed commands and queries
  • IMediatorNotification - in-process notification system
  • Complete Pipeline Behaviors: Logging, Performance, Validation, Caching, Transaction, Authorization, Retry
  • Domain Events and Integration Events with automatic dispatch
  • Event Sourcing with IEventStore, AggregateRoot<T>, Snapshots and Projections
  • Saga/Process Manager with compensation and timeout
  • Command idempotency with IIdempotentCommand
  • Scheduled Commands with background service
  • Inbox/Outbox patterns for reliable messaging

๐Ÿ”„ .NET 9 Modernization

  • HybridCache: Native hybrid cache (L1 + L2) with stampede protection
  • TimeProvider: Time abstraction for deterministic testing
  • PeriodicTimer: Modern timer in all background services
  • System.Threading.RateLimiting: Native rate limiting (Fixed/Sliding Window, Token Bucket)
  • System.Threading.Channels: High-performance Producer/Consumer
  • Microsoft.Extensions.Http.Resilience: Native HTTP resilience
  • Microsoft.Extensions.Resilience: Generic resilience for DB/messaging
  • ProblemDetails (RFC 7807): Standardized API errors
  • TypedResults (.NET 9): Minimal APIs with strong typing
  • Source Generators: [LoggerMessage] and [JsonSerializable] for AOT
  • Native OpenAPI: Microsoft.AspNetCore.OpenAPI (replaces Swashbuckle)
  • Keyed Services: Dependency injection by key
  • Output Caching: Native HTTP response caching
  • .NET Aspire 9: Cloud-native stack integration

๐Ÿ“Š Modern Observability (ILogger + OpenTelemetry)

  • Complete migration from TelemetryHelper to ILogger<T>
  • OpenTelemetry Tracing with ActivitySource in all modules
  • OpenTelemetry Metrics with Meter (Counters, Histograms, Gauges)
  • OpenTelemetry Logs integrated with ILogger
  • Correlation ID and W3C Trace Context propagation
  • AddMvp24HoursObservability() - all-in-one configuration
  • Exporters: OTLP (Jaeger, Tempo), Console, Prometheus

๐Ÿ—„๏ธ Advanced Entity Framework Core

  • Interceptors: Audit, SoftDelete, Concurrency, CommandLogging, SlowQuery
  • Multi-tenancy with automatic query filters and ITenantProvider
  • Field encryption with value converters
  • Row-level security helpers
  • Bulk Operations: BulkInsert, BulkUpdate, BulkDelete
  • Specification Pattern integrated with GetBySpecificationAsync()
  • IReadOnlyRepository<T> for queries (no write methods)
  • Cursor-based pagination (keyset)
  • Connection resiliency with retry policies
  • Health checks for SQL Server, PostgreSQL, MySQL
  • Read/Write splitting for read replicas
  • Separate DbContext for read vs write (CQRS)

๐Ÿƒ Advanced MongoDB

  • Interceptors: Audit, SoftDelete, CommandLogger
  • Multi-tenancy with automatic filters
  • Field-level encryption (CSFLE)
  • Optimized bulk operations
  • Change Streams for real-time events
  • GridFS for large files
  • Time Series Collections
  • Geospatial queries
  • Text search indexes
  • Health checks and replica set monitoring
  • Connection resiliency with circuit breaker

๐Ÿ‡ Enterprise RabbitMQ

  • Typed consumers with IMessageConsumer<T> (MassTransit replacement)
  • Request/Response pattern with IRequestClient<TRequest, TResponse>
  • Message Scheduling with delayed messages
  • Consume and publish Pipeline/Middleware
  • Automatic topology and naming conventions
  • Batch consumers with IBatchConsumer<T>
  • Transactional messaging with Outbox pattern
  • Sagas integration with state machines
  • Multi-tenancy with virtual hosts per tenant
  • Fluent API AddMvpRabbitMQ(cfg => {...})
  • Observability with OpenTelemetry and metrics

๐Ÿ“ฆ Advanced Pipeline (Pipe and Filters)

  • Typed pipeline IPipeline<TInput, TOutput>
  • Fluent API .Pipe<TIn, TOut>().Then<TNext>().Finally()
  • IPipelineContext with CorrelationId, Metadata, User
  • Fork/Join pattern for parallel flows
  • Dependency Graph between operations
  • Saga Pattern with orchestrated compensation
  • Checkpoint/Resume for long-running pipelines
  • State Snapshots for debug/audit
  • Detailed metrics per operation
  • Integration with FluentValidation, Cache and OpenTelemetry

๐ŸŒ Enhanced WebAPI

  • Exception mapping to ProblemDetails (RFC 7807)
  • Native rate limiting with policies per IP, User, API Key
  • Idempotency middleware for POST/PUT/PATCH
  • Security headers (HSTS, CSP, X-Frame-Options)
  • Request/Response logging with sensitive data masking
  • API versioning (URL, Header, Query String)
  • Unified health checks (/health, /health/ready, /health/live)
  • Minimal APIs with MapCommand<T>() and MapQuery<T>()
  • Model binders for DateOnly, TimeOnly, strongly-typed IDs

๐Ÿ—๏ธ Application Layer

  • IApplicationService<TEntity, TDto> with integrated AutoMapper
  • Separate QueryService and CommandService (CQRS light)
  • Validation pipeline with FluentValidation
  • Transaction scope with [Transactional] attribute
  • Integrated Specification Pattern
  • Configurable ExceptionToResultMapper
  • Audit trail on command operations
  • Cache with [Cacheable] attribute
  • PagedResult<T> and cursor-based pagination
  • Automatic soft delete

๐Ÿ”ง Base Infrastructure

  • HTTP Client factory with Polly resilience
  • Delegating handlers: Logging, Auth, Correlation, Telemetry, Retry, CircuitBreaker
  • Distributed locking (Redis, SQL Server, PostgreSQL)
  • File storage abstraction (Local, Azure Blob, S3)
  • Email service (SMTP, SendGrid, Azure Communication)
  • SMS service (Twilio, Azure Communication)
  • Background jobs abstraction (Hangfire, Quartz)
  • Secret providers (Azure KeyVault, AWS Secrets Manager)

๐Ÿ’พ Advanced Caching

  • ICacheProvider unified abstraction
  • Cache patterns: Cache-Aside, Read-Through, Write-Through, Write-Behind
  • Multi-level cache (L1 Memory + L2 Distributed)
  • Cache tags for group invalidation
  • Stampede prevention with locks
  • Circuit breaker for remote cache
  • Compression for large values
  • [Cacheable] and [CacheInvalidate] attributes

โฐ Enhanced CronJob

  • Configurable retry policy with circuit breaker
  • Overlapping execution control
  • Graceful shutdown with timeout
  • Health checks per job
  • Metrics: executions, duration, failures
  • OpenTelemetry spans per execution
  • Job dependencies (execute after another job)
  • Distributed locking for clusters
  • ICronJobStateStore for state persistence
  • Pause/resume jobs at runtime
  • 6-field CRON expressions (seconds)
  • Configuration via appsettings.json

๐Ÿงฑ Core Fundamentals

  • Guard clauses (Guard.Against.Null, Guard.Against.NullOrEmpty, etc.)
  • ValueObjects: Email, Cpf, Cnpj, Money, Address, DateRange, Percentage, PhoneNumber
  • Strongly-typed IDs: EntityId<T> with EF Core and JSON converters
  • Functional patterns: Maybe<T>, Either<TLeft, TRight>
  • Smart Enums: Enumeration<T> base class
  • Entity interfaces: IEntity<TId>, IAuditableEntity, ISoftDeletable, ITenantEntity
  • IClock and IGuidGenerator for testability
  • Nullable reference types throughout the framework

๐Ÿ“š Complete Bilingual Documentation

  • 50+ documents in PT-BR and EN-US
  • Sections: CQRS, Core, Observability, Modernization
  • Migration guides from MediatR and TelemetryHelper
  • Architecture diagrams
  • Practical code examples

๐Ÿงช Tests

  • 1000+ unit tests
  • Integration tests with Testcontainers (SQL Server, MongoDB)
  • Performance benchmarks
  • Test helpers: FakeLogger, FakeActivityListener, FakeMeterListener

โš ๏ธ Deprecated (Will be removed in next major)

  • TelemetryHelper - Use ILogger<T>
  • TelemetryLevels - Use LogLevel
  • ITelemetryService - Use ILogger<T>
  • AddMvp24HoursTelemetry() - Use AddMvp24HoursObservability()
  • HttpClientExtensions - Use AddStandardResilienceHandler()
  • MvpExecutionStrategy - Use ResiliencePipeline
  • MultiLevelCache - Use HybridCache

NET8

8.3.261

  • CronJob implementation.

8.2.102

  • Implementation of route handlers for conversion and binding of parameters for Minimal API.

8.2.101

  • Migration and refactoring of evolution to NET8.

NETCORE

4.1.191

  • Refactoring for asynchronous result mapping;

4.1.181

  • Anti-pattern removal;
  • Separation of log entity contexts for contract use only;
  • Update and detail architectural resources in documentation;
  • Correction of dependency injection in the RabbitMQ and Pipeline client;
  • Configuration of isolated consumers for RabbitMQ client;
  • Implementation of tests for database context with log;

3.12.262

  • Refactoring extensions.

3.12.261

  • Middleware test implementation.

3.12.221

  • Implementation of Delegation Handlers to propagate keys in the Header (correlation-id, authorization, etc);
  • Implementation of Polly to apply concepts of resilience and fault tolerance;
  • Correction of automatic loading of mapping classes with IMapFrom;

3.12.151

  • Removed generic typing from the IMapFrom class;
  • Implementation of Testcontainers for RabbitMQ, Redis and MongoDb projects;

3.2.241

  • Refactoring to migrate json file settings to fluent extensions;
  • Replacement of the notification pattern;
  • Review of templates;
  • Addition of HealthCheck to all samples;
  • Creation of a basic WebStatus project with HealthCheckUI;
  • Replacement of logging dependencies for trace injection through actions;
  • Trace/Verbose in all main libraries and layers;
  • Configuration of transaction isolation level for queries with EF;
  • Refactoring of the RabbitMQ library for consumer injection and fluid configuration for "DeadLetterQueue";
  • Persistent connection and resilience with Polly for RabbitMQ;
  • Implementation of asynchronous consumer for RabbitMQ;
  • Pipeline adjustment to allow adding messages to the package (info, error, warning, success) - replacement of the notification pattern;
  • Validation change (FluentValidation or DataAnnotations) to return list of messages - replacement of notification pattern;
  • Changed documentation and added configuration for WebAPI;
  • Refactoring of library testing;
  • Refactoring for migration from Core to .NET 6.

Other versions...

  • Relational database (SQL Server, PostgreSql and MySql)
  • NoSql database (MongoDb and Redis)
  • Message Broker (RabbitMQ)
  • Pipeline (Pipe and Filters pattern)
  • Documentation (Swagger)
  • Mapping (AutoMapper)
  • Logging
  • Standards for data validation (FluentValidation and Data Annotations), specifications (Specification pattern), work unit, repository, among others.
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.1.21 81 1/18/2026
9.1.20 143 1/2/2026
8.25.5061 343 5/6/2025
8.7.151 471 7/15/2024
8.5.610 178 5/6/2025
8.3.261 195 3/26/2024
8.2.102 240 2/9/2024
8.2.101 182 2/7/2024
5.4.281 202 4/28/2025
4.1.191 272 1/19/2024
4.1.181 154 1/19/2024
3.12.262 231 12/26/2023
3.12.261 143 12/26/2023
3.12.221 213 12/22/2023
3.12.151 218 12/17/2023
3.6.221 6,805 6/22/2022
3.4.111 973 4/11/2022
3.2.241 694 2/24/2022
3.2.171 638 2/17/2022
3.2.151 597 2/15/2022
3.2.142 571 2/14/2022
3.2.141 579 2/14/2022
3.2.21 599 2/2/2022
3.1.243 597 1/25/2022
3.1.242 626 1/24/2022
3.1.241 598 1/24/2022
3.1.221 596 1/22/2022
3.1.201 600 1/20/2022
3.1.101 595 1/10/2022
2.12.291 485 12/29/2021
2.12.102 568 12/10/2021
2.12.101 500 12/10/2021
2.12.71 507 12/7/2021
2.11.241 4,486 11/24/2021
1.9.81 645 9/8/2021
1.7.61 677 7/6/2021
1.6.251 593 6/25/2021
1.6.101 604 6/10/2021
1.5.311 930 5/31/2021
1.5.281 713 5/28/2021
1.5.171 1,081 5/17/2021
1.5.141 599 5/14/2021
1.5.132 624 5/13/2021
1.5.131 541 5/13/2021
1.4.301 547 4/30/2021
1.4.221 541 4/22/2021
1.4.220 516 4/22/2021
1.4.120 526 4/12/2021
1.4.82 549 4/9/2021
1.4.81 518 4/8/2021
1.4.21 538 4/2/2021
1.4.20 502 4/2/2021
1.0.20 528 4/2/2021
1.0.19 535 4/1/2021
1.0.18 569 3/16/2021
1.0.17 531 3/15/2021
1.0.16 549 3/15/2021
1.0.15 567 3/8/2021
1.0.12 515 3/2/2021
1.0.11 518 3/1/2021
1.0.10 532 2/12/2021
1.0.9 494 2/11/2021
1.0.8 510 2/11/2021
1.0.7 510 2/11/2021
1.0.6 508 2/11/2021
1.0.5 519 2/11/2021
1.0.4 533 2/11/2021
1.0.3 535 2/9/2021
1.0.2 516 2/3/2021
1.0.1 608 2/1/2021
1.0.0 595 1/29/2021