You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently no way to validate query options without throwing an exception. I'd like a TryValidate method, so I don't need to catch an exception to find out that the query options don't satisfy the settings. Ideally it would have an out parameter which includes the disallowed query option.
I've also had to make something similar in the past so definitely agree.
And please don't make the underlying implementation exception-based as that would miss an opportunity for performance improvement too.
Not sure if I 100% agree with your proposed API share, however. A bool TryValidate() method doesn't allow for more elaborate failure reporting. I think something similar to how FluentValidation does it would be better, where it can return multiple individual failures etc.
There is currently no way to validate query options without throwing an exception. I'd like a
TryValidate
method, so I don't need to catch an exception to find out that the query options don't satisfy the settings. Ideally it would have anout
parameter which includes the disallowed query option.The text was updated successfully, but these errors were encountered: