Releases: AKlaus/DomainResult
Releases · AKlaus/DomainResult
v3.2.0
v3.1.0
v3.0.0
New Features
- #43. Added support for IResult and the minimal API (introduced in .NET 6).
- #8. Add methods / status for returning Conflict (409) HTTP code.
- #45. Add methods / status for returning 'Service Unavailable' (503) HTTP code.
Breaking changes
- #44. Rename
ActionResultConventions.Error...
properties to...Failed...
to match the names of the correspondingIDomainResult
methods.
Knowledge sharing
- #51. Suppressing automatic HTTP 400 responses on invalid DTO/model.
v2.0.0
New Features
Breaking changes
- #38. Remove support of .NET Core 2.1
As .NET Core 2.1 has reached End of Support on August 21, 2021, its support was also removed from the package. - #36. Removed conversion of
IDomainResult
toActionResult<T>
as it's deemed controversial.
v1.1.1
v1.1.0
New Features
- #3. Added conversion between
IDomainResult<T>
with different types of{T}
.
Example: forvar res = IDomainResult.NotFound<int>()
useres.To<string>()
for propagating the response from a nested call in a method returning a different type ofT
(in this case -IDomainResult<string>
orTask<IDomainResult<string>>
). - #1. Added a method / status for returning
Unauthorized (403)
.
The domain methods can useDomainResult.Unauthorized()
,DomainResult.UnauthorizedTask()
,IDomainResult.Unauthorized()
orIDomainResult.UnauthorizedTask()
as the method's result that later will be converted to HTTP code403 (Forbidden)
in the MVC/API controllers. - #9. Added a deconstructor for
IDomainResult<T>
for easy access to thevalue
andIDomainResult
properties.
Example: forIDomainResult<int> res = DomainResult.Success(10)
usevar (value, details) = res
for deconstruction.
Breaking changes
This release contains a small, but breaking change.
- #2. The
Error()
methods is renamed toFailed()
to downplay the severity of the returned status.
So instead of "old"IDomainResult.Error<int>()
useIDomainResult.Failed<int>()