File: CHANGELOG.md
All notable changes to SharpFunctional.MSSQL are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
CircuitBreakernow supports an optionalTimeProviderfor deterministic clock-based state transitions and snapshotsSqlExecutionOptionsnow exposesTimeProviderused by retry scheduling
- Retry delays now use configured
TimeProviderin bothFunctionalMsSqlDbandDapperFunctionalDb - Documentation/examples updated to show
TimeProvider-aware circuit breaker construction
- Legacy constructor overloads were preserved/added for
CircuitBreakerandSqlExecutionOptionsto maintain backward binary compatibility
RetryJitterModeenum for opt-in retry delay jitter behavior (None,Full)SqlExecutionOptions.ActivityEnricherdelegate for custom activity tag enrichmentCircuitBreakerSnapshotimmutable diagnostics modelCircuitBreaker.GetSnapshot()for thread-safe state/counter/timing inspection
SqlExecutionOptionsconstructor extended with additive optional parameters:retryJitterModeactivityEnricher
FunctionalMsSqlDb,DapperFunctionalDb, andEfFunctionalDbnow apply optional activity enrichers to emittedActivityinstances
- Existing constructor calls and API usage remain valid
- Deterministic retry behavior remains default (
RetryJitterMode.None) - Activity enricher failures are ignored to avoid impacting operation flow
- LanguageExt.Core dependency — replaced with zero-dependency built-in functional types
SharpFunctional.MsSql.Functionalnamespace with:Option<T>— optional value struct (Some/None,Match,IfSome,IfNone,Map,Bind)Fin<T>— result monad struct (Succ/Fail,Match,Map,Bind,IfSucc,IfFail)Seq<T>— immutable sequence backed byImmutableArray<T>(implementsIReadOnlyList<T>)Unit— void replacement structError— structured error class withNew(string),New(Exception), implicit conversionsPrelude— static helpers (FinFail,FinSucc,toSeq,Seq<T>(),Optional,Some,None,unit)
- All
using LanguageExt/using static LanguageExt.Preludereplaced withusing SharpFunctional.MsSql.Functional - NuGet package description updated (no longer references LanguageExt)
- Package tags updated (removed
languageext) FunctionalMsSqlDblogging now uses source-generatedLoggerMessagemethods for lower-allocation package diagnostics
- Replace
using LanguageExt;/using LanguageExt.Common;withusing SharpFunctional.MsSql.Functional; - Replace
using static LanguageExt.Prelude;withusing static SharpFunctional.MsSql.Functional.Prelude; - All type names and method signatures remain identical —
Option<T>,Fin<T>,Seq<T>,Error.New(),FinFail<T>(),toSeq()all work the same way
FindPaginatedAsync<T>— server-side pagination returningFin<QueryResults<T>>with clamped page/sizeFindAsync<T>(IQuerySpecification<T>)— specification pattern queries with filter, include, ordering, and pagingInsertBatchAsync<T>— configurable batch inserts withSaveChangesAsyncper batchUpdateBatchAsync<T>— batch updates with automatic detached-entity attachmentDeleteBatchAsync<T>— predicate-based batch deletes in configurable chunksStreamAsync<T>—IAsyncEnumerable<T>streaming viaAsAsyncEnumerable()
ExecuteStoredProcPaginatedAsync<T>— paginated stored procedure results viaQueryMultipleAsync
QueryResults<T>— immutable pagination record withTotalPages,HasNextPage,HasPreviousPage,ItemsOnPage, andMap<TResult>projectionIQuerySpecification<T>— composable query specification interfaceQuerySpecification<T>— fluent builder withAddInclude,SetOrderBy,SetOrderByDescending,SetSkip,SetTakeCircuitBreaker— thread-safe circuit breaker pattern using C# 14LockclassCircuitBreakerOptions— configurable failure threshold, open duration, and half-open success thresholdCircuitStateenum —Closed,Open,HalfOpen
- 8 new OpenTelemetry tag constants:
CorrelationIdTag,DurationMsTag,EntityTypeTag,BatchSizeTag,ItemCountTag,PageNumberTag,PageSizeTag,CircuitStateTag - EF Core activity tracing via
StartEfActivityfor all new methods (ef.find.paginated,ef.find.spec,ef.batch.insert,ef.batch.update,ef.batch.delete)
FunctionalMsSqlDb— primary constructor, property accessors, collection expressionsEfFunctionalDb— primary constructor, property accessorsDapperFunctionalDb— primary constructor, property accessors, C# 14Lockclass
- Zero breaking changes — all new features are additive; existing public API surface is unchanged
- Backward compatible — existing code continues to work without modification
- Minimum runtime: .NET 10 / C# 14
- Initial release
FunctionalMsSqlDbfacade with EF Core and Dapper backendsEfFunctionalDb—GetByIdAsync,FindOneAsync,QueryAsync,AddAsync,SaveAsync,DeleteByIdAsync,CountAsync,AnyAsync,WithTrackingDapperFunctionalDb—QueryAsync,QuerySingleAsync,ExecuteStoredProcAsync,ExecuteStoredProcSingleAsync,ExecuteStoredProcNonQueryAsync- Transaction support:
InTransactionAsync,InTransactionMapAsync SqlExecutionOptionswith retry and timeout configurationSqlTransientDetectorfor transient SQL error detectionFunctionalExtensions—BindAsync,MapAsync- OpenTelemetry
ActivitySourceintegration - DI registration via
ServiceCollectionExtensions - Full xUnit v3 test suite