Skip to content

Conversation

@Choc13
Copy link
Contributor

@Choc13 Choc13 commented Apr 16, 2019

No description provided.

@Choc13 Choc13 requested a review from baileydoestech April 16, 2019 07:55
README.md Outdated
This library provides a `ToActionResult` extension method for `Result<TData>` which converts it to an appropriate `IActionResult`.
There are various overloads to provide flexibiility.
`Result<TData>` is a type defined in the `Winton.DomainModelling.Abstractions` package.
It is a type that is intended to be returned from domain operations.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these points would be easy to read as bullet points

README.md Outdated

If the `Result<TData>` was a success then we typically want to return a 2xx response from the API containing the data in the body.
If the `Result<TData>` was a failure then we typically want to return a 4xx response from the API containg [problem details](https://tools.ietf.org/html/rfc7807) in the body.
This library, therefore, provides a `ToActionResult` extension method for `Result<TData>` which matches on the result and converts it to an appropriate `IActionResult`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure 'therefore' is adding anything here

@Choc13 Choc13 merged commit 6936d2d into master Apr 16, 2019
@Choc13 Choc13 deleted the improve-readme branch April 16, 2019 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants