Skip to content

Releases: AKlaus/DomainResult

v3.2.0

01 Jan 00:41
Compare
Choose a tag to compare

New Features

  • #63. Added methods / status for returning Content Too Large (413) HTTP code
  • #68. .NET 8 support and abandoning .NET 3.1 (.NET 5 is the earliest supported now).

v3.1.0

01 Jan 22:58
f506818
Compare
Choose a tag to compare

New Features

  • #53. .NET 7 support. Especially, support for IResult<T> (typed results) in minimal API.
  • #56. Added implicit conversion of (T, IDomainResult) to IDomainResult<T>.
  • #59. Updated NuGet packages

Knowledge sharing

  • #54. How to: Conversion IDomainResult to IDomainResult<T>

v3.0.0

25 Jul 11:42
0ab2fd3
Compare
Choose a tag to compare

New Features

Breaking changes

  • #44. Rename ActionResultConventions.Error... properties to ...Failed... to match the names of the corresponding IDomainResult methods.

Knowledge sharing

  • #51. Suppressing automatic HTTP 400 responses on invalid DTO/model.

v2.0.0

11 Dec 08:31
8e30c89
Compare
Choose a tag to compare

New Features

  • #37. Added support of .NET 6
  • #33. Publish README.md in the package description on NuGet.org

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 to ActionResult<T> as it's deemed controversial.

v1.1.1

27 May 02:16
Compare
Choose a tag to compare

New Features

  • #20. Support of .NET 5
    Revised the targeting frameworks (moved away from incorrectly targeting .NET Standard to specific .NET Core versions)
    added testing of all the targeting frameworks

v1.1.0

31 Oct 05:48
Compare
Choose a tag to compare

New Features

  • #3. Added conversion between IDomainResult<T> with different types of {T}.
    Example: for var res = IDomainResult.NotFound<int>() use res.To<string>() for propagating the response from a nested call in a method returning a different type of T (in this case - IDomainResult<string> or Task<IDomainResult<string>>).
  • #1. Added a method / status for returning Unauthorized (403).
    The domain methods can use DomainResult.Unauthorized(), DomainResult.UnauthorizedTask(), IDomainResult.Unauthorized() or IDomainResult.UnauthorizedTask() as the method's result that later will be converted to HTTP code 403 (Forbidden) in the MVC/API controllers.
  • #9. Added a deconstructor for IDomainResult<T> for easy access to the value and IDomainResult properties.
    Example: for IDomainResult<int> res = DomainResult.Success(10) use var (value, details) = res for deconstruction.

Breaking changes

This release contains a small, but breaking change.

  • #2. The Error() methods is renamed to Failed() to downplay the severity of the returned status.
    So instead of "old" IDomainResult.Error<int>() use IDomainResult.Failed<int>()