-
-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add NotFound extension. #102
Comments
Which do you prefer? |
The custom exception, it's more explicit. |
Yes, or similar with Ardalis.Result if you don't want the exception to bubble up that far. Wondering if that's something I can build into that package, and how/if it should depend on this one for that exception type... Want to PR this? |
If Ardalis.Result already depends on GuardClauses, then sure. I have to crosscheck what you have there and how this can be utilized. I'll add the PR later tonight or tomorrow if it's not an issue. |
It's a common scenario where we need to validate if a given queried object/entity exists. Instead of checking for null, we can have a more explicit extension for this scenario. We may name it simply
NotFound
.The usage will be something like
We have two options here:
KeyNotFoundException
NotFoundException
in the package.The text was updated successfully, but these errors were encountered: