Closed KyleMcMaster closed 2 years ago
@KyleMcMaster looks great, thanks :)
Fixes #94
Package | Line Rate | Branch Rate | Complexity |
---|---|---|---|
Ardalis.Result.SampleWeb | 62% | 50% | 38 |
Ardalis.Result.AspNetCore | 67% | 70% | 27 |
Ardalis.Result | 33% | 22% | 60 |
Ardalis.Result.Sample.Core | 25% | 32% | 48 |
Ardalis.Result.FluentValidation | 0% | 0% | 6 |
Summary | 42% (243 / 573) | 43% (29 / 68) | 179 |
Fixes #81
Possibly fixes issue #94. I prefer separating
Map
andToActionResult
into different methods based on SRP since it isToActionResult
's responsibility for mappingResult<T> -> ActionResult<T>
rather than mappingResult<T> -> Result<K> -> ActionResult<K>
. It is possible consumers may want to change aResult
'sValue
type separately of producing anActionResult
. This approach avoids the need for anyIMapper
dependency.