- Notifications
You must be signed in to change notification settings - Fork 254
Add tests for EF6 evaluators. #520
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.
Pull Request Overview
The PR adds new tests for the EF6 evaluators, especially to help diagnose and eventually fix issues such as non-parameterized LIKE queries and lack of support for multiple chains in EF6. Key changes include:
- Introducing a GetQueryString helper method in the IntegrationTest class to capture SQL logs.
- Adding test suites for Search, Order, Include, and AsNoTracking evaluators.
- Removing now-unused using directives in data model files.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Ardalis.Specification.EntityFramework6.Tests/FixtureNew/IntegrationTest.cs | Added a helper method to log and filter SQL queries for tests. |
| tests/Ardalis.Specification.EntityFramework6.Tests/FixtureNew/Data/Company.cs | Removed redundant using directive. |
| tests/Ardalis.Specification.EntityFramework6.Tests/FixtureNew/Data/Address.cs | Removed redundant using directive. |
| tests/Ardalis.Specification.EntityFramework6.Tests/Evaluators/SearchEvaluatorTests.cs | Added tests for search evaluator and noted issues via TODO comments. |
| tests/Ardalis.Specification.EntityFramework6.Tests/Evaluators/OrderEvaluatorTests.cs | Added tests for order evaluator including chained ordering. |
| tests/Ardalis.Specification.EntityFramework6.Tests/Evaluators/IncludeEvaluatorTests.cs | Added tests for include evaluator and commented-out tests for unsupported features. |
| tests/Ardalis.Specification.EntityFramework6.Tests/Evaluators/AsNoTrackingEvaluatorTests.cs | Added tests for AsNoTracking evaluator verifying query modifications. |
tests/Ardalis.Specification.EntityFramework6.Tests/Evaluators/SearchEvaluatorTests.cs Outdated Show resolved Hide resolved
tests/Ardalis.Specification.EntityFramework6.Tests/Evaluators/IncludeEvaluatorTests.cs Outdated Show resolved Hide resolved
This was referenced Aug 20, 2025
Closed
Closed
Closed
Closed
Closed
This was referenced Nov 10, 2025
This was referenced Nov 19, 2025
Open
This was referenced Nov 27, 2025
This was referenced Dec 8, 2025
This was referenced Dec 20, 2025
Open
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
I've never used the EF6 provider; it was a community contribution.
It turns out we have many bugs there. There is no support for multiple chains. The generated LIKE queries are not parameterized, etc. We'll have to improve the evaluators for EF6 significantly.