Skip to content

Conversation

fiseni
Copy link
Collaborator

@fiseni fiseni commented Jun 15, 2025

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.

@fiseni fiseni requested a review from Copilot June 15, 2025 13:47
Copy link

@Copilot Copilot AI left a 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.

@fiseni fiseni merged commit 48882d7 into main Jun 15, 2025
1 check passed
@fiseni fiseni deleted the fiseni/ef6-tests-evaluators branch June 15, 2025 13:53
This was referenced Aug 20, 2025
This was referenced Aug 25, 2025
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 this pull request may close these issues.

1 participant