ardalis / Result

A result abstraction that can be mapped to HTTP response codes if needed.
MIT License
866 stars 107 forks source link

Add non-generic Result type to support void methods #41

Closed ardalis closed 3 years ago

ardalis commented 4 years ago

This might require a different IResult interface that doesn't have Type/Value.

Should work as a return type instead of void.

ardalis commented 3 years ago

Consider keeping just the generic Result but using a Unit type where there is no type and for results from void methods.

See: https://github.com/jbogard/MediatR/blob/master/src/MediatR/Unit.cs

ardalis commented 3 years ago

I don't think this will work well with the current approach after some research.