Skip to content
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

Remove the state for the Query builder. Update it as a calculated property. #418

Closed
Tracked by #427
fiseni opened this issue Nov 9, 2024 · 0 comments · Fixed by #441
Closed
Tracked by #427

Remove the state for the Query builder. Update it as a calculated property. #418

fiseni opened this issue Nov 9, 2024 · 0 comments · Fixed by #441
Assignees

Comments

@fiseni
Copy link
Collaborator

fiseni commented Nov 9, 2024

We no longer will keep the specification builder a state. It will be defined as a calculated property and we'll create an instance on access public ISpecificationBuilder<T> Query => new SpecificationBuilder<T>(this);

In version 9 we'll improve the builders, so the whole query can be written as a single chain. Therefore the common use will not require more than one allocation. By removing the state, we'll save an additional 8 bytes used for the reference.

Other than that, the property will no longer be defined as virtual. Not a single user is overriding and defining their specification builder. The builder is the essence of this library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant