Represents the NuGet versions.
- Fixed: Missing
QueryArgs.IncludeText
added to set the$text=true
equivalent. - Fixed: Simplification of creating and setting the
QueryArgs.Filter
using an implict string operator.
- Fixed: Added support for
SettingsBase.DateTimeTransform
,StringTransform
,StringTrim
andStringCase
to allow specification via configuration. - Fixed: Added support for
CoreEx:
hierarchy (optional) for all CoreEx settings to enable a more structured and explicit configuration.
- Enhancement: Integrated
UnitTestEx
version5.0.0
to enable the latest capabilities and improvements.CoreEx.UnitTesting.NUnit
given changes is no longer required and has been deprecated, theUnitTestEx.NUnit
(or other) must be explicitly referenced as per testing framework being used.CoreEx.UnitTesting
package updated to include only standard .NET core capabilities to follow newUnitTestEx
pattern; new packages created to house specific as follows:CoreEx.UnitTesting.Azure.Functions
created to house Azure Functions specific capabilities;CoreEx.UnitTesting.Azure.ServiceBus
created to house Azure Service Bus specific capabilities.
- Existing usage will require references to the new packages as required. There should be limited need to update existing tests to use beyond the requirement for the root
UnitTestEx
namespace. The updated default withinUnitTestEx
is to expose the key capabilities from the root namespace. For example,using UnitTestEx.NUnit
, should be replaced withusing UnitTestEx
.
- Enhancement: Added
net9.0
support. - Enhancement: Deprecated
net7.0
support; no longer supported by Microsoft. - Enhancement: Updated dependencies to latest; including transitive where applicable.
- Enhancement: Added extended capabilities to the
InvokeArgs
to allow additional customization.
- Fixed: The
ExecutionContext.Messages
were not being returned as intended within thex-messages
HTTP Response header; enabled within theExtendedStatusCodeResult
andExtendedContentResult
on success only (status code>= 200
and<= 299
). Note these messages are JSON serialized as the underlyingMessageItemCollection
type. - Fixed: The
AgentTester
has been updated to return aHttpResultAssertor
where the operation returns aHttpResult
to enable further assertions to be made on theResult
itself.
- Fixed: The
IServiceCollection.AddCosmosDb
extension method was registering as a singleton; this has been corrected to register as scoped. The dependentCosmosClient
should remain a singleton as is best practice.
- Fixed: Updated
Microsoft.Extensions.Caching.Memory
package depenedency to latest (including related); resolve Microsoft Security Advisory CVE-2024-43483. - Fixed: Fixed the
ExecutionContext.UserIsAuthorized
to have base implementation similar toUserIsInRole
. - Fixed: Rationalize the
UtcNow
usage to be consistent, where applicableExecutionContext.SystemTime.UtcNow
is leveraged.
- Fixed: The
ValueContentResult.TryCreateValueContentResult
would returnNotModified
where the requestETag
wasnull
; this has been corrected to returnOK
with the resultingvalue
. - Fixed: The
ValueContentResult.TryCreateValueContentResult
now returnsExtendedStatusCodeResult
versusStatusCodeResult
as this offers additional capabilities where required. - Enhancement: The
ExtendedStatusCodeResult
andExtendedContentResult
now implementIExtendedActionResult
to standardize access to theBeforeExtension
andAfterExtension
functions. - Enhancement: Added
WebApiParam.CreateActionResult
helper methods to enable execution of the underlyingValueContentResult.CreateValueContentResult
(which is no longer public as this was always intended as internal only). - Fixed:
PostgresDatabase.OnDbException
corrected to usePostgresException.MessageText
versusMessage
as it does not include theSQLSTATE
code. - Enhancement: Improve debugging insights by adding
ILogger.LogDebug
start/stop/elapsed for theInvokerArgs
. - Fixed: Updated
System.Text.Json
package depenedency to latest (including related); resolve Microsoft Security Advisory CVE-2024-43485.
- Enhancement: Enable JSON serialization of database parameter values; added
DatabaseParameterCollection.AddJsonParameter
method and associatedJsonParam
,JsonParamWhen
andJsonParamWith
extension methods. - Enhancement: Updated (simplified)
EventOutboxEnqueueBase
to pass events to the underlying stored procedures as JSON versus existing TVP removing database dependency on a UDT (user-defined type). - Note: Accidently published as
v3.25.6
, re-publishing asv3.26.0
as intended - includes no code changes.
- Fixed: Fixed the unit testing
CreateServiceBusMessage
extension method so that it no longer invokes aTesterBase.ResetHost
(this reset should now be invoked explicitly by the developer as required).
- Fixed: Fixed the
InvalidOperationException
with a 'Sequence contains no elements' when performing validation with theCompareValuesRule
that has theOverrideValue
set. - Fixed: Updated all dependencies to latest versions.
- Fixed: Added function parameter support for
WithDefault()
to enable runtime execution of the default statement where required for the query filter capabilities.
- Fixed:
HttpRequestOptions.WithQuery
fixed to ensure any previously setInclude
andExclude
fields are not lost (results in a merge); i.e. only theFilter
andOrderBy
properties are explicitly overridden.
- Fixed: Extend
QueryFilterFieldConfigBase
to includeAsNullable()
to specifiy whether the field supportsnull
. - Fixed: Extend
QueryFilterFieldConfigBase
to includeWithResultWriter()
to specify a function to override the corresponding LINQ statement result writing. - Fixed: Adjusted the fluent-style method-chaining interface to improve usability (and consistency).
- Enhancement: Added new
CoreEx.Data
project/package to encapsulate all generic data-related capabilities, specifically the newQueryFilterParser
andQueryOrderByParser
classes. These enable a limited, explicitly supported, dynamic capability to$filter
and$orderby
an underlying query similar to OData. This is not intended to be a replacement for the full capabilities of OData, GraphQL, etc. but to offer basic dynamic flexibility where needed.- Added
IQueryable<T>.Where()
andIQueryable<T>.OrderBy
extension method that will use the aforementioned parsers configured within the newQueryArgsConfig
andQueryArgs
and apply leveragingSystem.Linq.Dynamic.Core
. - Updated
HttpRequestOptions
andWebApiRequestOptions
to supportQueryArgs
($filter
and$orderby
query string arguments) similar to the existingPagingArgs
. - Added
QueryAttribute
to enable Swagger/Swashbuckle generated documentation.
- Added
- Fixed: Fixed missing
IServiceCollection.AddCosmosDb
including correspondingCosmosDbHealthCheck
. - Fixed: Added
JsonIgnore
to all interfaces that have aCompositeKey
property as not intended to be serialized by default. - Fixed: Fixed
ReferenceDataCollectionBase<TId, TRef, TSelf>
constructor which was hidingsortOrder
andcodeComparer
parameters.
- Fixed:
CosmosDb.SelectMultiSetWithResultAsync
updated to skip items that are not considered valid; ensures same outcome as if using aCosmosDbModelQueryBase
with respect to filtering.
- Enhancement:
CosmosDb.SelectMultiSetWithResultAsync
andSelectMultiSetAsync
added to enable the selection of multiple sets of data in a single operation; see alsoMultiSetSingleArgs
andMultiSetCollArgs
. - Enhancement:
CosmosDbValue.Type
is now updatable and defaults fromCosmosDbValueModelContainer<TModel>.TypeName
(updateable usingUseTypeName
).
- Fixed:
CosmosDbValue<TModel>.PrepareBefore
corrected to set thePartitionKey
where the underlyingValue
implementsIPartitionKey
. - Fixed:
CosmosDbBatch
corrected to default to theCosmosDbContainerBase<TSelf>.DbArgs
where not specified. - Fixed:
CosmosDbArgs.AutoMapETag
added, indicates whether when mapping the model to the corresponding entity that theIETag.ETag
is to be automatically mapped (default istrue
, existing behavior).
- Fixed: Added
Result<T>.AdjustsAsync
to support asynchronous adjustments.
- Fixed: Added
Result<T>.Adjusts
as wrapper forObjectExtensions.Adjust
to simplify support and resolve issue where the compiler sees the adjustment otherwise as a implicit cast resulting in an errant outcome.
- Fixed:
DatabaseExtendedExtensions.DeleteWithResultAsync
corrected to return aTask<Result>
.`
- Fixed: Updated all dependencies to latest versions (specifically UnitTestEx).
- Enhancement: Added
ICacheKey
and updatedRequestCache
accordingly to support, in addition to the existingIEntityKey
, to enable additional caching key specification. - Enhancement: Added
ItemKeySelector
toEntityBaseDictionary
to enable automatic inference of the key from an item being added. - Fixed: Updated all dependencies to latest versions.
- Enhancement: Identifier parsing and
CompositeKey
formatting moved to theCosmosDbArgs
to enable overriding where required. - Enhancement: Cosmos model constraint softened to allow for
IEntityKey
to support more flexible identifier scenarios. - Enhancement: All Cosmos methods updated to support
CompositeKey
versusobject
for identifier specification for greater flexibility. - Enhancement:
CosmosDbModelContainer
andCosmosDbValueModelContainer
enable model-only access; also, all model capabilities housed under newModel
namespace. - Fixed:
PagingOperationFilter
correctly specifies a format ofint64
for thenumber
-type paging parameters. - Fixed:
CompositeKey
correctly supportsIReferenceData
types leveraging the underlyingIReferenceData.Code
.
- Fixed:
Mapper.MapSameTypeWithSourceValue
added (defaults totrue
) to map the source value to the destination value where the types are the same; previously this would result in an exception unless added explicitly. TheMapper.SameTypeMapper
enables. - Fixed:
ReferenceDataOrchestrator.GetAllTypesInNamespace
added to get all theIReferenceData
types in the specified namespace. Needed for the likes of theCosmosDbBatch.ImportValueBatchAsync
where a list of types is required.
- Enhancement:
CoreEx.Cosmos
improvements:- Added
CosmosDbArgs
toCosmosDbContainerBase
to allow per container configuration where required. - Partition key specification centralized into
CosmosDbArgs
. ITenantId
andILogicallyDeleted
support integrated intoCosmosDbContainerBase
, etc. to offer consistent behavior withEfDb
.
- Added
- Fixed: Include all constructor parameters when using
AddReferenceDataOrchestrator
. - Enhancement: Integrated dynamic
ITenantId
filtering intoEfDb
(controlled withEfDbArgs
).
- Fixed: Updated all dependencies to latest versions.
- Enhancement: Added
DatabaseCommand.SelectAsync
andSelectWithResultAsync
that has no integrated typing and mapping.
- Fixed: The
ITypedMappedHttpClient.MapResponse
was not validating the input HTTP response correctly before mapping; resulted in anull
success value versus the originating error/exception. - Fixed: The
HttpResult<T>.ThrowOnError
was not correctly throwing the internal exception.
- Fixed: Removed
Azure.Identity
dependency as no longer required; related tohttps://github.com/advisories/GHSA-wvxc-855f-jvrv
. - Fixed: Removed
AspNetCore.HealthChecks.SqlServer
dependency as no longer required. - Fixed: Updated all dependencies to latest versions.
- Fixed:
CoreEx.AutoMapper
updated to leverage latest major version (13.0.1
); as suchnetstandard
no longer supported. - Fixed: The
TimerHostedServiceBase
was incorrectly resetting theLastException
on sleep versus wake. - Fixed: The
AddEventSender
dependency injection extension methods now correctly register as Scoped. - Fixed: The
Logger.LogInformation
invocations refactored toLogger.LogDebug
where applicable to reduce noise in the logs. - Fixed: The
IPropertyRule.ValidateAsync
method removed as it was not required and could lead to incorrect usage. - Fixed: The
ValueValidator
now only supports aConfigure
method to enableIPropertyRule
-based configuration (versus directly). - Fixed: The
CommonValidator.ValidateAsync
is now internal as this was not intended and could lead to incorrect usage. - Enhancement: Added
AfterSend
event toIEventSender
to enable post-send processing. - Enhancement: Added
EventOutboxHostedService.OneOffTrigger
method to enable a one-off trigger interval to be specified for the registered (DI) instance.
- Enhancement: Additional
CoreEx.Validation
usability improvements:Validator.CreateFor<T>
added to enable the creation of aCommonValidator<T>
instance for a specified typeT
(more purposeful name); synonym for existingCommonValidator.Create<T>
(unchanged).Validator.Null<T>
added to enable simplified specification of aIValidatorEx<T>
ofnull
to avoid explicitnull
casting.Collection
extension method has additional overload to pass in theIValidatorEx<TItem>
to use for each item in the collection; versus, having to useCollectionRuleItem.Create
.Dictionary
extension method has additional overload to pass in theIValidatorEx<TKey>
andIValidator<TValue>
to use for each entry in the dictionary; versus, having to useDictionaryRuleItem.Create
.MinimumCount
andMaximumCount
extension methods forICollection
added to enable explicit specification of these two basic validations.Validation.CreateCollection
renamed toValidation.CreateForCollection
and creates aCommonValidator<TColl>
.- Existing
CollectionValidator
deprecated as theCommonValidator<TColl>
offers same; removes duplication of capability.
- Existing
Validation.CreateDictionary
renamed toValidation.CreateForDictionary
and creates aCommonValidator<TDict>
.- Existing
DictionaryValidator
deprecated as theCommonValidator<TDict>
offers same; removes duplication of capability.
- Existing
- Enhancement: Added
ServiceBusReceiverHealthCheck
to perform a peek message on theServiceBusReceiver
as a means to determine health. UseIHealthChecksBuilder.AddServiceBusReceiverHealthCheck
to configure. - Fixed: The
FileLockSynchronizer
,BlobLeaseSynchronizer
andTableWorkStatePersistence
have had any file/blob/table validations/manipulations moved from the constructor to limit critical failures at startup from a DI perspective; now only performed where required/used. This also allows improved health check opportunities as means to verify.
- Enhancement: Added basic FluentValidator compatibility to the
CoreEx.Validation
by supporting key (common) named capabilities:AbstractValidator<T>
added as a wrapper forValidator<T>
; with both supportingRuleFor
method (wrapper for existingProperty
).NotEmpty
,NotNull
,Empty
,Null
,InclusiveBetween
,ExclusiveBetween
,Equal
,NotEqual
,LessThan
,LessThanOrEqualTo
,GreaterThan
,GreaterThanOrEqualTo
,Matches
,Length
,MinimumLength
,MaximumLength
,PrecisionScale
,EmailAddress
andIsInEnum
extension methods added (invoking existing equivalents).NullRule
andNotNullRule
added to support theNull
andNotNull
capabilities specifically.WithMessage
added to explcitly set the error message for a preceedingIValueRule
(equivalent to specifying when invoking extension method).ValidatorStrings
have had their fallback texts added to ensure an appropriate text is output whereITextProvider
is not available.- Note: The above changes are to achieve a basic level of compatibility, they are not intended to implement the full capabilities of FluentValidation; nor, will it ever. The
CoreEx.FluentValidation
enables FluentValidation to be used directly where required; also, the existingCoreEx.Validation.InteropRule
enables interoperability between the two.
- Enhancement: Added
StringSyntaxAttribute
support to improve intellisense for JSON and URI specification. - Enhancement: Added
EventPublisherHealthCheck
that will send anEventData
message to verify that theIEventPublisher
is functioning correctly.- Note: only use where the corresponding subscriber(s)/consumer(s) are aware and can ignore/filter to avoid potential downstream challenges.
- Enhancement: This is a clean-up version to remove all obsolete code and dependencies. This will result in a number of minor breaking changes, but will ensure that the codebase is up-to-date and maintainable.
- As per
v3.14.0
the previously obsoletedTypedHttpClientBase
methodsWithRetry
,WithTimeout
,WithCustomRetryPolicy
andWithMaxRetryDelay
are now removed; includingTypedHttpClientOptions
,HttpRequestLogger
and relatedSettingsBase
capabilities. - Health checks:
CoreEx.Azure.HealthChecks
namespace and classes removed.SqlServerHealthCheck
replaced with simple genericDatabaseHealthCheck
.IServiceCollection.AddDatabase
automatically addsDatabaseHealthCheck
.IServiceCollection.AddSqlServerEventOutboxHostedService
automatically addsTimerHostedServiceHealthCheck
.IServiceCollection.AddReferenceDataOrchestrator
automatically addsReferenceDataOrchestratorHealthCheck
(reports cache statistics).HealthReportStatusWriter
added to support richer JSON reporting.- Generally recommend using 3rd-party library to enable further health checks; for example:
https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks
.
- As per
- Fixed: The
Result.ValidatesAsync
extension method signature has had the value nullability corrected to enable fluent-style method-chaining. - Fixed: The fully qualified type and property name is now correctly used as the
LText.KeyAndOrText
when creating within thePropertyExpression<TEntity, TProperty>
to enable a qualified key that can be used by theITextProvider
to substitute the text at runtime; the existing text fallback behavior remains such that an appropriate text is used. ThePropertyExpression.CreatePropertyLTextKey
function can be overridden to change this behavior.
- Enhancement: Planned feature obsoletion. The
TypedHttpClientBase
methodsWithRetry
,WithTimeout
,WithCustomRetryPolicy
andWithMaxRetryDelay
are now marked as obsolete and will result in a compile-time warning. RelatedTypedHttpClientOptions
,HttpRequestLogger
andSettingsBase
capabilities have also been obsoleted.- Why? Primarily based on Microsoft guidance around
IHttpClientFactory
usage. Specifically advances in native HTTP resilency support, and the .NET 8 networking improvements. - When? Soon, planned within the next minor release (
v3.15.0
). This will simplify the underlyingTypedHttpClientBase
logic and remove the internal dependency on an older version of the Polly package. - How? Review the compile-time warnings, and update the codebase to use the native
IHttpClientFactory
resiliency capabilities.
- Why? Primarily based on Microsoft guidance around
- Enhancement: Updated
CoreEx.UnitTesting
to leverage the latestUnitTestEx
(v4.2.0
) which has added support for testingHttpMessageHandler
andHttpClient
configurations. This will enable improved mocked testing as a result of the above changes where applicable. - Enhancement: Added
CustomSerializers
property toIEventSerializer
of typeCustomEventSerializers
. This allows for the add (registration) of custom JSON serialization logic for a specifiedEventData.Value
type. This is intended to allow an opportunity to serialize a specific type in a different manner to the default JSON serialization; for example, exclude certain properties, or use a different serialization format. - Enhancement: Updated the unit testing
ExpectedEventPublisher
so that it now executes the configuredIEventSerializer
during publishing. A newUnitTestBase.GetExpectedEventPublisher
extension method added to simplify access to theExpectedEventPublisher
instance and correspondingGetPublishedEvents
property to enable further assert where required.
- Enhancement: Added
DatabaseMapperEx
enabling extended/explicit mapping where performance is critical versus existing that uses reflection and compiled expressions; can offer up to 40%+ improvement in some scenarios. - Enhancement: The
AddMappers<TAssembly>()
andAddValidators<TAssembly>()
extension methods now also support two or three assembly specification overloads. - Enhancement: A
WorkState.UserName
has been added to enable the tracking of the user that initiated the work; this is then checked to ensure that only the initiating user can interact with their own work state. - Fixed: The
ReferenceDataOrchestrator.GetByTypeAsync
has had the previous sync-over-async corrected to be fully async. - Fixed: Validation extensions
Exists
andExistsAsync
which expect a non-null resultant value have been renamed toValueExists
andValueExistsAsync
to improve usability; also they areIResult
aware and will act accordingly. - Fixed: The
ETag
HTTP handling has been updated to correctly output and expect the weakW/"xxxx"
format. - Fixed: The
ETagGenerator
implementation has been further optimized to minimize unneccessary string allocations. - Fixed: The
ValueContentResult
will only generate a response header ETag (ETagGenerator
) for aGET
orHEAD
request. The underlying resultIETag.ETag
is used as-is where there is no query string; otherwise, generates as assumes query string will alter result (i.e. filtering, paging, sorting, etc.). The resultIETag.ETag
is unchanged so the consumer can still use as required for a further operation. - Fixed: The
SettingsBase
has been optimized. The internal recursion checking has been removed and as such an endless loop (StackOverflowException
) may occur where misconfigured; given frequency ofIConfiguration
usage the resulting performance is deemed more important. Additionally,prefixes
are now optional.- The existing support of referencing a settings property by name (
settings.GetValue<T>("NamedProperty")
) and it using reflection to find before querying theIConfiguration
has been removed. This was not a common, or intended usage, and was somewhat magical, and finally was non-performant.
- The existing support of referencing a settings property by name (
- Enhancement: Added new
CoreEx.Database.Postgres
project/package to support PostgreSQL database capabilities. Primarily encapsulates the open-sourceNpqsql
.NET ADO database provider for PostgreSQL.- Added
EncodedStringToUInt32Converter
to support PostgreSQLxmin
column encoding as the row version/etag.
- Added
- Enhancement: Migrated sentence case logic from inside
PropertyExpression
intoCoreEx.Text.SentenceCase
to improve discoverablity and reuse opportunities. - Fixed: The
IServiceCollection.AddAzureServiceBusClient
extension method as been removed; theServiceBusClient
will need to be instantiated prior to usage. Standard approach is for consumers to create client instances independently. - Fixed: The
WorkOrchestrator.GetAsync<T>()
andWorkOrchestrator.GetAsync(string type, ..)
methods were not automatically cancelling where expired. - Fixed: The
InvokerArgs
activity tracing updated to correctly capture theException.Message
where anException
has been thrown. - Internal:
- All
throw new ArgumentNullException
checking migrated to thexxx.ThrowIfNull
extension method equivalent. - All Run Code Analysis issues resolved.
- All
- Enhancement: The
ITypedToResult
updated to correctly implementIToResult
as the simpleToResult
where required. - Enhancement: Added
Result.AsTask()
andResult<T>.AsTask
to simplify the conversion to a completedTask<Result>
orTask<Result<T>>
where applicable. - Enhancement: Added
IResult.IsFailureOfType<TException>
to indicate whether the result is in a failure state and the underlying error is of the specifiedTException
type. - Enhancement: Added
EventTemplate
property to theWebApiPublisherArgs
andWebApiPublisherCollectionArgs
to define anEventData
template. - Enhancement: Added
SubscriberBase<T>
constructor overload to enable specification ofvalueValidator
andValueIsRequired
parameters versus setting properties directly simplifying usage. - Enhancement: Enum renames to improve understanding of intent for event subscribing logic:
ErrorHandling.None
is nowErrorHandling.HandleByHost
andErrorHandling.Handle
is nowErrorHandling.HandleBySubscriber
. - Enhancement: Simplified the
ServiceBusSubscriber.Receive
methods by removing theafterReceive
parameter which served no real purpose; also, reversed thevalidator
andvalueIsRequired
parameters (order as stated) as thevalidator
is more likely to be specified thanvalueIsRequired
which defaults totrue
. - Enhancement: Added
CoreEx.Hosting.Work
namespace which includes light-weight/simple foundational capabilities to track and orchestrate work; intended for the likes of asynchronous request-response scenarios.- Added
IWorkStatePersistence
to enable flexible/pluggable persistence of theWorkState
and resulting data; includesInMemoryWorkStatePersistence
for testing,FileWorkStatePersistence
for file-based, andTableWorkStatePersistence
leveraging Azure table storage. - Added
WorkStateOrchestrator
support toEventSubscriberBase
, including correspondingServiceBusSubscriber
andServiceBusOrchestratedSubscriber
using theServiceBusMessage.MessageId
as the correspondingWorkState.Id
. - Extended
EventSubscriberArgs
to support a newSetWorkStateDataAsync
operation to enable the setting of the underlyingWorkState
data is a consistent manner where using the event subscriber capabilities.
- Added
- Enhancement: The
WebApiPublisher
publishing methods have been simplified (breaking change), primarily through the use of a new argument that encapsulates the various related options. This will enable the addition of further options in the future without resulting in breaking changes or adding unneccessary complexities. The relatedREADME
has been updated to document. - Enhancement: Added
ValidationUseJsonNames
toSettingsBase
(defaults totrue
) to allow settingValidationArgs.DefaultUseJsonNames
to be configurable.
- Enhancement: A new
Abstractions.ServiceBusMessageActions
has been created to encapsulate either aMicrosoft.Azure.WebJobs.ServiceBus.ServiceBusMessageActions
(existing in-process function support) orMicrosoft.Azure.Functions.Worker.ServiceBusMessageActions
(new isolated function support) and used internally. Implicit conversion is enabled to simplify usage; existing projects will need to be recompiled. The latter capability does not supportRenewAsync
and as such this capability is no longer leveraged for consistency; review documentedPeekLock
behavior to get desired outcome. - Enhancement: The
Result
,Result<T>
,PagingArgs
andPagingResult
have hadIEquatable
added to enable equality comparisons. - Enhancement: Upgraded
UnitTestEx
dependency to4.0.2
to enable isolated function testing. - Enhancement: Enabled
IJsonSerializer
support forCompositeKey
JSON serialization/deserialization. - Enhancement: Added
IEventDataFormatter
which when implemented by the value set as theEventData.Value
allows additional formatting to be applied by theEventDataFormatter
. - Enhancement: Added
IsMapNullIfNull
toBidirectionalMapper
that indicates whether to mapnull
source value to a correspondingnull
destination automatically. - Fixed: Added
ReferenceDataMultiDictionaryConverterFactory
to ensure eachIReferenceDataCollection
is serialized correctly according to its underlying type. - Fixed:
EventDataFormatter
andCloudEventSerializerBase
updated to correctly set theKey
property where applicable. - Internal: Upgraded
NUnit
dependency to4.0.1
for allCoreEx
unit test; also, all unit tests now leverage the NUnit constraint model testing approach.
- Fixed: The
CoreEx.Text.JsonSerializer
has been updated to cache the indented option correctly. - Fixed: The
ReferenceDataOrchestator
updated to use the correct serializer forETag
generation.
- Enhancement: The
ValueContentResult.CreateResult
has been updated to return the resulting value as-is where is an instance ofIActionResult
; otherwise, convertsvalue
to aValueContentResult
(previous behavior). - Enhancement: The
PagingArgs
has been extended to supportToken
; being a continuation token to enable paging to be performed where the underlying data source does not support skip/take-style paging.
- Fixed: The
ReferenceDataMultiCollection
andReferenceDataMultiItem
have been replaced with theReferenceDataMultiDictionary
as existing resulted in an unintended format with which to return the data. This fix also removed the need for theReferenceDataMultiCollectionConverterFactory
as custom serialization for this is no longer required.
- Fixed: The
WebApi.PutWithResultAsync
methods that supportget
function parameter have had the result nullability corrected. - Fixed: The
BidirectionalMapper<TFrom, TTo>
has been added to further simplify the specification of a bidirectional mapping capability.
- Enhancement: The
Mapper<TSource, TDestination>
has a new constructor override to enable the specification of the mapping (OnMap
equivalent) logic. - Enhancement: The
Mapper
has hadWhen*
helper methods added to aid the specification of the mapping logic depending on theOperationTypes
(singular) being performed. - Enhancement: A new
NoneRule
validation has been added to ensure that a value is none (i.e. must be its default value).
- Fixed: All related package dependencies updated to latest.
- Enhancement: Added
Converter.Create<TSource, TDestionation>
to enable a simple one-offIConverter<TSource, TDestionation>
implementation to be created. - Fixed: The
IReferenceData.SetInvalid
method corrected to throwNotImplementedException
where not explicitly implemented. - Fixed: The
ReferenceDataBase
updated to handle theIsValid
andSetInvalid
functionality correctly.
- Enhancement: Added
IBidirectionalMapper<TFrom, TTo>
to enable a single mapping capability that can support mapping both ways. - Enhancement: Added
IBidirectionalMapper<TFrom, TTo>
registration support toMapper.Register
and by extensionIServiceCollection.AddMappings
. - Enhancement: Finalized initial capabilities for
CoreEx.OData
; package now published.
- Enhancement:
UnitTestEx
as ofv4.0.0
removed all dependencies toCoreEx
, breaking a long-time circular reference challenge. Added extension capabilities to enable existing behaviors. These extensions have been added withinCoreEx.UnitTesting
andCoreEx.UnitTesting.NUnit
respectively; usingUnitTestEx
namespace to minimize breaking changes and clearly separate. The following will need to be corrected where applicable:- Add
UnitTestEx
namespace where missing to enable new extension methods. - Replace existing
TestSetUp.Default.ExpectedEventsEnabled = true
withTestSetUp.Default.EnableExpectedEvents()
; changed to a method as extension properties are not currently supported in C#. - Replace existing
TestSetUp.Default.ExpectNoEvents = true
withTestSetUp.Default.ExpectNoEvents()
; changed to a method as extension properties are not currently supported in C#. - The existing
ApiTester.Agent
property has had to be made an extension method as follows:- Before:
test.Agent<ContactAgent, Contact>().Expect...
- After:
test.Agent().With<ContactAgent, Contact>().Expect...
- Before:
- The
ValidationTester
has not been ported; but has been implemented using extension methods on theGenericTester
as follows:- Before:
ValidationTester.Create().ExpectErrors("").Run<XxxValidator, Xxx>(x);
- After:
GenericTester.Create().ExpectErrors("").Validation().With<XxxValidator, Xxx>(x);
- Before:
- Add
- Enhancement: Added
net8.0
support.
- Enhancement: Update the
JsonFilterer
classes to support qualified (indexed) property names; all paths are standardized with the$
prefix internally. - Enhancement: Added
JsonNode
extension methodsApplyInclude
andApplyExclude
to simplify correspondingJsonFilterer
usage. - Enhancement: Added
JsonElementComparer
to compare twoJsonElement
values (and typed values) and return the differences (JsonElementComparerResult
). Additionally, theJsonElementComparerResult.ToMergePatch
will create a correspondingJsonNode
that represents anapplication/merge-patch+json
representation of the differences. - Enhancement: Added
DateTimeToStringConverter
to enable the explicit formatting of aDateTime
to astring
and vice-versa. - Enhancement: Added
JsonObjectMapper
to enable explicit mapping of aType
(class) to aJsonObject
and vice-versa (versus serialization). This enables property conversion, mapping and operation types to be specified, similar to other CoreEx mapping capabilities. - Enhancement: Renamed
WebApiPublisher.PublishAsync<TColl, TItem>
toWebApiPublisher.PublishCollectionAsync<TColl, TItem>
to be more explicit with respect to purpose and usage. - Enhancement: The
WebApiPublisher.PublishAsync
has had theeventModifier
delegate parameter simplified to no longer include a value as this is already available via theValue
property of the existingEventData
parameter. - Enhancement: Added additional overloads to
WebApiPublisher.PublishAsync
andWebApiPublisher.PublishCollectionAsync
to support the event publishing of a different (mapped) type where applicable; seeeventModifier
delegate parameter. Additionally, supportsWebApiPublisher.Mapper
to convert/map by default where applicable. - Fixed: The
Result.OnFailure*
methods corrected to pass in theError
versus theValue
(previously throwing incorrect exception as a result). - Enhancement: Added new
CoreEx.OData
project/package to support OData capabilities. Primarily encapsulates the open-sourceSimple.OData.Client
.- Note: this package has not been published as this is currently considered experimental; is subject to future change and/or removal.
- Enhancement: Added new
CoreEx.Dataverse
project/package to support Microsoft Dataverse (formerly known as Common Data Service or CDS) capabilities. Primarily encapsulates theServiceClient
and mappings to/from the Dataverse entities.- Note: this package has not been published as this is currently considered experimental; is subject to future change and/or removal.
- Fixed: The
IEfDb.With
fixed (as extension methods) to also support thewith
value being passed into the correspondingAction<T>
to simplify usage (only a subset of common intrinsic types supported, both nullable and non-nullable overloads). - Fixed: Missing
Result.CacheSet
andResult.CacheRemove
extension methods added toCoreEx.Results
to fully enableIRequestCaching
in addition to existingResult.CacheGetOrAddAsync
.
- Enhancement: Added
IEventSubscriberInstrumentation
(and relatedEventSubscriberInstrumentationBase
) to enableEventSubscriberBase.Instrumentation
monitoring of the subscriber as applicable. - Enhancement: Previous
EventSubscriberInvoker
exception/error handling moved into individual subscribers for greater control; a newErrorHandler
added to encapsulate the consistent handling of the underlying exceptions/errors. This was internal and should have no impact. - Enhancement:
ErrorHandling.ThrowSubscriberException
renamed toHandle
andErrorHandling.TransientRetry
renamed toRetry
. Old names have been obsoleted and as such will generate a compile-time error where not corrected. - Enhancement: Added
DataConsistencyException
to support the throwing of possible data consistency issues; internally integrated throughout CoreEx. - Enhancement: Added
IDatabase.SqlFromResource
support to enable simple access to SQL statements embedded as a resource within a specified assembly. - Enhancement:
Result.When*
methods updated to support optionalotherwise
function to enableif/then/else
scenarios (only invoked whereResult.IsSuccess
).
- Fixed:
ServiceBusSubscriber
was not correctly bubbling (not handling) exceptions whereUnhandledHandling
was set toErrorHandling.None
. Was incorrectly treating same asErrorHandling.ThrowSubscriberException
and automatically dead-lettering and continuing.
- Enhancement: Distributed tracing has been added via the
InvokerBase
set of classes throughoutCoreEx
to ensure coverage and consistency of implementation. A newInvokeArgs
has been added to house theActivitySource
instance; this also provides for further extension opportunities limiting future potential breaking changes.
- Enhancement: Added
ServiceBusReceiverActions
as a means to encapsulate theServiceBusReceivedMessage
andServiceBusReceiver
as aServiceBusMessageActions
equivalent to enable both theServiceBusSubscriber
andServiceBusOrchestratedSubscriber
to be leveraged outside of native Azure Functions. - Enhancement: Added support for claim-check pattern for large messages.
EventData.Value
serialization to be stored as an attachment in the likes of blob storage and then referenced (claim-check) from the actual message. A newIAttachmentStorage
encapsulates the attachment behavior with theIEventSerializer
implementations referencing as applicable; whereby separating this behavior from theIEventSender
enabling greater consistency and reuse. AddedBlobAttachmentStorage
andBlobSasAttachmentStorage
to support Azure blob storage.
- Fixed: The
DatabaseParameterCollection.AddParameter
now explicitly sets theDbParameter.Value
toDbNull.Value
where the value passed in isnull
.
- Enhancement: Added
Hosting.ServiceBase
class for a self-orchestrated service to execute for a specifiedMaxIterations
; provides an alternative to using aHostedService
. Useful for the likes of timer trigger Azure Functions for eample. - Enhancement: Added
EventOutboxService
as an alternative toEventOutboxHostedService
; related to (and leverages) above to achieve same outcome. - Fixed:
Database.OnDbException
was incorrectly converting the unhandled exception to aResult
; will now throw as expected.
- Enhancement: Added new
CoreEx.Results
namespace with primaryResult
andResult<T>
classes to enable monadic error-handling, often referred to Railway-oriented programming; seeCoreEx.Results
for more implementation details. Thanks Adi for inspiring and guiding on this change. Related changes as follows:- Enhancement:
EventSubscriberBase
,SubscriberBase
andSubscriberBase<T>
modified to includeEventSubscriberArgs
(Dictionary<string, object?>
) to allow other parameters to be passed in. TheReceiveAsync
methods now support the args as a parameter, and must return aResult
to better support errors; breaking change. - Enhancement: Where overriding
Validator.OnValidateAsync
this method must return aResult
, as does theCustomRule
(for consistency); breaking change. TheResult
enables other errors to be returned avoiding the need/cost to throw an exception. - Enhancement:
ExecutionContext
user authorization methods have been renamed (UserIsAuthorized
andUserIsInRole
) and explicitly leverageResult
; breaking change. - Enhancement:
IReferenceDataProvider.GetAsync
method now supports a return type ofResult<T>
; breaking change.
- Enhancement:
- Enhancement: The
WebApi
namespace has been moved to a newCoreEx.AspNetCore
project/package to decouple these explicit ASP.NET Core capabilities from the core; breaking change.- The
IExceptionResult
interface has been deprecated as a result; all exceptions have been updated accordingly.
- The
- Fixed: Validation extension method
EnsureValue
has been renamed toRequired
to be more explicit as to purpose; breaking change. - Fixed:
InvokerBase
andInvokerBase<TResult>
now split sync and async code to avoid sync over async; requires both the sync and async virtual methods to be overridden to implement correctly. - Enhancement: Ad-hoc performance optimizations; some minor breaking changes primarily impacting internal usage.
- Enhancement: Added
net6.0
andnet7.0
support in addition to .NET Standard to all packages. This will allow access to additional features per version where required, and overall performance improvements. - Enhancement: Added
CoreEx.Solace
to enable the publishing of messages to Solace message broker; thanks Israel. - Enhancement: Updated
CoreEx.Cosmos
to support direct model queries usingModelQuery
methods where applicable. - Enhancement: Added
PagingOperationFilterFields
to allow specific selection of fields for thePagingOperationFilter
. This was influenced by pull request 67.
- Fixed:
EventOutboxHostedService
updated so when a newIServiceScope
is created thatExecutionContext.Reset
is invoked to ensure existingServiceProvider
is not reused. - Fixed:
EventDataFormatter
defaultsPartitionKey
andTenantId
properties, where not already set, from the value where implementsIPartitionKey
andITenantId
respectively.
- Enhancement: Added
IServiceBusSubscriber
with following properties:AbandonOnTransient
(perform an Abandon versus bubbling exception),MaxDeliveryCount
(max delivery count check within subscriber),RetryDelay
(basic transient retry specification) andMaxRetryDelay
(defines upper bounds of retry delay). These are defaulted from correspondingIConfiguration
settings. Both theServiveBusSubscriber
andServiveBusOrchestratedSubscriber
implement; related logic withinServiceBusSubscriberInvoker
. - Enhancement: Added
RetryAfterSeconds
toTransientException
to allow overriding; defaults to120
seconds. - Fixed: Log output from subscribers will no longer write exception stack trace where known
IExtendedException
(noise reduction). - Fixed:
ValidationException
message reformatted such that newlines are no longer included (message simplification).
- Fixed: The dead-lettering within
ServiceBusSubscriberInvoker
will write the exception stack trace, etc. to a new message property namedSubscriberException
to ensure this content is consistently persisted, with related error description being the exception message only.
- Enhancement: Added
PagingAttribute
andPagingOperationFilter
to enable swagger output ofPagingArgs
parameters for an operation.
- Enhancement: Added
CoreEx.EntityFrameworkCore
support for .NET frameworknet7.0
. - Enhancement: Updated
ServiceBusSubscriberInvoker
to improve logging, including opportunities to inherit and add further before and after processing logging and/or monitoring. - Enhancement: Updated
ServiceBusOrchestratedSubscriber
to perform aLogInformation
on success. - Enhancement: The
TypedHttpClientBase<TSelf>
will probe settings byGetType().Name
to enable settings per implementation type as an overridding configurable option. - Fixed:
HttpResult.CreateExtendedException
passes innerHttpRequestException
for context. - Fixed:
EventSubscriberOrchestrator.AmbiquousSubscriberHandling
is correctly set toErrorHandling.CriticalFailFast
by default.
- Enhancement: Simplified usage for
TypedHttpClientCore
andTypedHttpClientBase
such that all parameters with the exception ofHttpClient
default where not specified. - Enhancement:
IServiceCollection
extension methods forCoreEx.Validation
andCoreEx.FluentValidation
support option to include/exclude underlying interfaces where performing register usingAddValidator
andAddValidators
. - Enhancement: Enable interoperability between
CoreEx.Validation
and a non-CoreEx.Validation
mappedIValidator
; seeInterop
validation extension method. - Enhancement:
ServiceBusOrchestratedSubscriber
added to support orchestrated (EventSubscriberOrchestrator
) event subscribers (IEventSubscriber
,SubscriberBase
andSubscriberBase<T>
) based on matching metadata (EventSubscriberAttribute
) to determine which registered subscriber to execute for the currentServiceBusReceivedMessage
. - Enhancement:
BlobLockSynchronizer
added to performIServiceSynchronizer
using Azure Blob storage. - Fixed: Resolved transaction already diposed exception for the
EventOutboxHostedService
by creating a newIServiceProvider
scope and instantiating aEventOutboxDequeueBase
per execution to ensure all dependencies are reinstantiated where applicable. - Enhancement: Updated all package dependencies to latest.
- Enhancement:
ReferenceDataOrchestrator
supportsIConfigureCacheEntry
to enable flexibility of configuration; no changes to current behaviour. - Fixed:
ReferenceDataBase
was not correctly managing theId
andIdType
throughout the inheritence hierarchy. - Enhancement: Database, Entity Framework, and Cosmos capabilities can be configured within their respective
*Args
to perform aCleaner.Clean
automatically on the response. Defaults tofalse
to maintain current functionality. - Fixed:
Mapper<T>
was not correctly initializing nullable destination properties during aFlatten
; for example, a destinationDateTime?
was being set with aDateTime.MinValue
where source property was not nullable. A newInitializeDestination
can be optionally specified (or overridden) to perform; otherwise, current initialization behavior will continue.
- Fixed: Database
RowVersion
conversion fixed to correctly enable per database provider.
- Fixed:
ReferenceDataOrchestrator
further updated to attempt to useExecutionContext
where possible whenCurrent
has not previously been set; this is similar to previous behaviour (<2.5.1
). - Fixed:
ReferenceDataOrchestrator
updated to leverageAsyncLocal
forCurrent
to removestatic
value leakage; lifetime within the context of the request.
- Fixed:
System.ObjectDisposedException: Cannot access a disposed object
for theIServiceProvider
has been resolved where reference data loading (ReferenceDataOrchestrator
), that in turn loaded child reference data. A new start upUseReferenceDataOrchestrator
method simplifies set up.
- Enhancement: Added string casing support to
Cleaner
andEntityCore
using newStringCase
; beingNone
(as-is default),Upper
,Lower
andTitle
. Leverages standard .NETTextInfo
to implement underlying case conversion. - Fixed: Applied all changes identified by Code Analysis.
- Fixed:
NullReferenceException
inEntityBaseDictionary
where item value isnull
corrected. - Enhancement: Added
KeyModifier
function toObservableDictionary
to allow key manipulation to ensure consistency, i.e. all uppercase. - Fixed: Potential SQL Injection opportunity within
DatabaseExtendedExtensions.ReferenceData
corrected when schema and table names were being specified explicitly; now quoted usingDbCommandBuilder.QuoteIdentifier
.
- Enhancement: Added
CompareValuesRule
,EnumRule
andEnumValueRule
as additional validation rules.
- Enhancement:
PagingArgs.MaxTake
default set bySettingsBase.PagingMaxTake
. - Enhancement: Reference data
ICacheEntry
policy configuration can now be defined in settings.
- Fixed: Entity Framework
EfDb.UpdateAsync
resolved error where the instance of entity type cannot be tracked because another instance with the same key value is already being tracked. - Fixed: The
CollectionMapper
was incorrectly appending items to an existing collection, versus performing a replacement operation. - Enhancement: Improved Entity Framework support where entities contain relationships, both query and update; new
EfDbArgs.QueryNoTracking
andEfDbArgs.ClearChangeTrackerAfterGet
added to configure/override default behaviour. - Enhancement: Added
TypedHttpClientOptions OnBeforeRequest
and withinTypedHttpClientBase<TSelf>
to enable updating of theHttpRequestMessage
before it is sent.
- Enhancement: Added additional
ReferenceDataBaseEx.GetRefDataText
method overload with a parameter ofid
; as an alternative to the pre-existingcode
. - Enhancement:
ReferenceDataOrchestrator
caching supports virtualOnGetCacheKey
to enable overridding classes to further define the key characteristics.
- Enhancement: Added support for
MySQL
through introduction ofMySqlDatabase
that supports similar pattern toSqlServerDatabase
. - Enhancement: Added new
EncodedStringToDateTimeConverter
to simulate row versioning from aDateTime
(timestamp) as an alternative. - Enhancement: Breaking change:
CoreEx.EntityFrameworkCore
updated to only have database provider independent reference ofMicrosoft.EntityFrameworkCore
. Developer will need to add database specific within own solution to use. - Enhancement: Breaking change: Moved classes that inherit from the likes of
EntityBase
into correspondingExtended
namespace as secondary, and moved the correspondingModels
implementation into root as primary and removed namespace accordingly. This is to ensure consistency, such that extended usage is explicit (non-default).MessageItem
updated to no longer inherit fromEntityBase
as the extended capabilities are not required. - Enhancement: Breaking change: The
AddValidators
extension method has been updated to register the implementing validators directly, versus the underlyingIValidatorEx
. This enables multiple validators to be registered for an entity. Any references to the interface will need to be updated to reference the concrete to continue functioning through dependency injection. Generally, the validators are not mocked, and the concrete classes can be if need usingMOQ
where required; impact of change is considered low risk for higher reward. - Enhancement: Added the security related capabilities to
ExecutionContext
as was previously available in Beef.
- Enhancement: Added new
Mapping.Mapper
as a simple (explicit)IMapper
capability as an alternative to AutoMapper. Enable the keyMap
,Flatten
andExpand
mapping capabilities. This is no reflection/compiling magic, just specified mapping code which executes very fast. - Enhancement: Breaking change: Validation
Additional
method renamed toAdditionalAsync
to be more explicit. - Enhancement: Breaking change: The
SqlServer
specific capabilities withinCoreEx.Database
project/assembly have been moved to a newCoreEx.Database.SqlServer
project/assembly.
- Enhancement: Updated the
EventOutboxEnqueueBase
andEventOutboxDequeueBase
to include theEventDataBase.Key
value/column. - Enhancement: Added the
EventOutboxHostedService
(migrated fromNTangle
) to enable hosted outbox publishing service execution. - Enhancement:
LoggerEventSender
updated to also log event metadata.
- Enhancement: Loosened
EntityCollectionResult
genericTEntity
constraint toEntityBase
to enable inherited extended entitites. - Enhancement: Extended
TypedHttpClientBase<TSelf>
to supportDefaultOptions
andSendOptions
to enable default configuration of newTypedHttpClientOptions
; i.e. the likes ofWithRetry
can now default versus having to be set per invocation ofSendAsync
. - Enhancement: Added
TypedMappedHttpClientBase
,TypedMappedHttpClientCore
andTypedMappedHttpClient
with newIMapper
property used to add extended support for request and response type mappings as part of the request. New methods areGetMappedAsync
,PostMappedAsync
,PutMappedAsync
andPatchMappedAsync
where applicable. - Enhancement:
IConverter<T>
usability improvements; including others that leverage. - Enhancement: AutoMapper converters added for common
IConverter<T>
implementations to enable. - Enhancement:
ReferenceDataOrchestrator.ConvertFromId(object? id)
overload added to enable usage whenType
ofId
is unknown. - Enhancement: Added
RefDataLoader
overload that supports stored procedure command usage. - Enhancement: Extended
TableValuedParameter
to support standard list types; including corresponding configurableDatabaseColumn
names. - Enhancement: Add
DatabaseCommand.SelectMultiSetAsync
overloads to support paging. - Enhancement: Added
IEntityKey
to enable key-based support in a consistent and standardized manner; refactoredIIdentifier
andIPrimaryKey
to leverage; existing references within updated to leverageIEntityKey
where applicable. - Enhancement: Improved validation handling of nullable vs non-nullable types when adding rules.
- Enhancement:
EntityBase
usage simplified especially where inheriting indirectly, i.e. from a base class that inheritsEntityBase
. As a resultEntityBase<>
will be deprecated next version.ICloneable
support removed, now supported viaExtendedExtensions.Clone<T>()
. - Enhancement: Improved the
HttpArg
query string output support. - Enhancement: Added
Models.ChangeLog
(does not inherit fromEntityBase
) as alternative toEntities.ChangeLog
(which does). Also, added correspondingAutoMapper
mapping between the two. - Enhancement:
CosmosDbContainerBase
updated to further centralize functionality, inheriting classes updated accordingly. - Enhancement: Breaking change:
ICollectionResult.Collection
renamed toICollectionResult.Items
. - Enhancement: Breaking change:
IReferenceDataCollection
propertiesAllList
andActiveList
renamed toAllItems
andActiveItems
respectively. - Enhancement: Breaking change:
HttpClientEx
removed as was a duplicate ofTypedHttpClient
; the latter was/is the intended implementation. - Enhancement:
JsonDataReader
when loadingIReferenceData
will attempt to read using both JSON and .NET Property names before overridding to allow additional flexibility within the specified JSON/YAML. - Enhancement:
ReferenceDataOrchestrator
concurrency support improved to ensure loading of reference data items for aType
is managed with aSemaphoreSlim
to ensure only a single thread loads (only once). - Fixed:
SettingsBase
was not looking for keys containing__
or:
consistently. - Fixed:
JsonFilterer
implementations now filters contents of a JSON object array correctly.
- Enhancement: Ported and refactored CosmosDb components from Beef repo.
- Enhancement: Breaking change: Replaced
DatabaseArgs.Paging
withDatabaseQuery.Paging
andDatabaseQuery.WithPaging
. - Enhancement: Breaking change: Replaced
EfDbArgs.Paging
withEfDbQuery.Paging
andEfDbQuery.WithPaging
. - Enhancement: Added
JsonDataReader
to enable dynamic loading of either YAML or JSON formatted data for data migration/uploading. - Enhancement: Added
WebApiExceptionHandlerMiddleware
to manage any unhandled exceptions. - Enhancement: Added
TypedHttpClient
to enable basic support for instantiating aTypedHttpClientCore
without having to explicitly inherit. - Enhancement: Breaking change: HealthChecks project deprecated with functionality moved to individual projects where applicable.
- Enhancement: Added
EfDbEntity
to provide a typed entity wrapper over theIEfDb
operations. - Enhancement:
AddAzureServiceBusClient
has had support to configureServiceBusClientOptions
added. - Fixed: The
ServiceBusMessage
cannot be sent due to local transactions not being supported with other resource managers/DTC resolved. - Fixed: The
AuthenticationException
andAuthorizationException
HTTP status codes were incorrect; updated to401
and403
respectively.
- Enhancement:
InvokerBase<TInvoker, TArgs>
has been updated to that theTArgs
value is optional. - Enhancement:
ReferenceDataFilter
added to simplify HTTP Agent filtering as a single encapsulated object. - Enhancement:
WebApi.ConvertNotfoundToDefaultStatusCodeOnDelete
property added to convertNotFoundException
to the defaultStatusCode
(NoContent
) as considered an idempotent operation; defaults totrue
. - Enhancement:
PropertyExpression.SentenceCaseConverter
added to enable overridding of defaultToSentenceCase
logic. - Fixed:
HttpArg
whereHttpArgType.FromUriUseProperties
was incorrectly formatting string values. - Fixed:
WebApi.Patch
operation was not returning the updated value correctly. - Fixed:
WebApiExecutionContextMiddleware
not settingUsername
andTimestamp
correctly. - Fixed:
WebApiInvoker
was not setting thex-error-type
andx-error-code
headers forIExtendedException
exceptions. - Fixed:
WebApiParam
updated to useETag
header (primary) thenIETag.ETag
property (secondary) as requestETag
value. - Fixed:
ValidationException
updated to return message asMediaTypeNames.Text.Plain
where message only (i.e. no property errors). - Fixed:
IChangeLog
values set correctly forIDatabase
andIEfDb
create and update. - Fixed:
IDatabase
connection open override methods now called correctly. - Fixed:
CollectionRuleItem<TItem>
updated to support duplicate checking byIIdentifier<T>
as well as the existingIPrimaryKey
.
- Fixed: Invokers updated to leverage
async/await
correctly.
- Enhancement: Added
WithTimeout(TimeSpan timeout)
support toTypedHttpClientBase
to enable per request timeouts. - Enhancement: Added
AddFluentValidators<TAssembly>
to automatically add the requisite dependency injection (DI) configuration for all validators defined within anAssembly
. - Enhancement: Breaking change: Refactored the extended entities to simplify implementation and improve experience via new
EntityBase.GetPropertyValues
and correspondingPropertyValue
. - Enhancement: Ported and refactored validation framework from Beef repo.
- Enhancement: Added support for
IReferenceData
serialization where only theCode
is serialized/deserialized. This also required newIReferenceDataContentJsonSerializer
,ReferenceDataContentJsonSerializer
andReferenceDataContentWebApi
for when fullIReferenceData
content serialization is required. - Enhancement: Serializers updated to support
ICollectionResult
which by default only (de)serializes the underlyingCollection
. ThePaging
is expected to be handled separately. - Enhancement: Ported and refactored core database framework components from DbEx rep.
- Enhancement: Ported and refactored extended database and entity framework components from Beef repo.
- Enhancement: Added implementation agnostic
IMapper
for typed value mappings. Added AutoMapper implementation with wrapper to enable.
- Enhancement: Overloads added to
WebApi
andWebApiPublisher
to allow the body value to be passed versus reading from theHttpRequest
. This is useful where allowing the likes of the ASP.NET infrastructure to deserialize value directly. - Enhancement: Automatic
ETag
generation is performed prior to field filtering as this is considered a post response action and should not affectETag
value. - Enhancement: Added
EventSendException
to provide a standard means to capture the events not sent to enable additional processing of those where required.
- Enhancement: Status code checking added to
TypedHttpClientBase<TSelf>
. - Enhancement: Added
IValidator<T>
to enable any implementation (agnostic); created wrappers to enableFluentValidation
(including dependency injection helper). - Enhancement: Added
AcceptsBodyAttribute
to enable Swagger (viaAcceptsBodyOperationFilter
) to output body type characteristics where not explicitly defined. - Enhancement: Added opt-in simulated concurrency (ETag) checking/generation to
WebApi.PutAsync
andWebApi.PatchAsync
where underlying data source does not support. - Enhancement: Added
CancellationToken
to allAsync
methods.
- Enhancement:
IIdentifier.GetIdentifier
method replaced withIIdentifier.Id
. TheIIdentifier<T>
overrides theId
property hiding the baseIIdentifier.Id
. - Enhancement:
ValueContentResult
properties are now all get and set enabled. TheValue
property has been removed as it is JSON serialized intoContent
. - Fixed:
ValueContentResult.ETag
generation enhanced to handle different query string parameters when performing an HTTP GET forIEnumerable
(collection) types. - Enhancement: Added
HttpClientEx
as a light-weight means to instantiate a one-off instance from anHttpClient
. - Enhancement: Added
JsonMergePatch
(application/merge-patch+json
) whereby the contents of a JSON document are merged into an existing object value as per RFC7396. - Enhancement: Added/updated reference data capabilities.
- Plus, many more minor fixes and enhancements.
- Enhancement: Breaking change: The event publishing (
IEventPublisher
) is now designed to occur in three distinct phases: 1) formatting (EventDataFormatter.Format
), 2) serialization (IEventSerializer.SerializeAsync
), and 3) sending (IEventSender.SendAsync
). TheEventPublisher
has been added to orchestrate this flow. - Enhancement: Updated the
IJsonSerializer
implementation defaults to align with the expected default serialization behavior. - Fixed: The
TypedHttpClientBase
fixed to handle where therequestUri
parameter is only a query string and not a path.
- New: Initial publish to GitHub/NuGet.