-
Couldn't load subscription status.
- Fork 254
Update and improve the builder infrastructure. #442
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
Conversation
| this ISpecificationBuilder<T> builder, | ||
| bool condition) where T : class | ||
| { | ||
| if (condition) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of passing in a condition flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's similar to WhereIf types of LINQ extensions. In our case, if the condition is false, the statement does nothing, meaning the expression/value is not added to the specification state. This allows you to have a more succinct way of expressing the query. Instead of having if clauses, you can pass that condition to the extension method itself. We have this for a long time.
The #420 contains more details
Fixes #419
Fixes #420