Replies: 2 comments 1 reply
-
After reading ToResult() i decided to change my logic, to match the logic that ToResult exposed, otherwise it would be too confusing |
Beta Was this translation helpful? Give feedback.
1 reply
-
I'd personally recommend using As for the extension method itself, we can definitely add it to the library, feel free to submit a PR. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
i just had a case at work, where i had a validation method (in the domain), that was returning a Maybe, i use that validation service in my applicative service, and there's no error mapping into a more generic one, then i return a UnitResult.
so the code is very much like:
but i was thinking of something like this would be great to have:
i was just wondering what you guys think, before submitting this.
so the behaviour would be
if theres a value in the maybe -> ToUnitResult -> UnitResult failure
if theren no value in the value -> toUnitResult -> UnitResult Success.
Beta Was this translation helpful? Give feedback.
All reactions