Skip to content

Add EF Core 9 support#13

Open
okramarenko wants to merge 40 commits intomasterfrom
add9.0
Open

Add EF Core 9 support#13
okramarenko wants to merge 40 commits intomasterfrom
add9.0

Conversation

@okramarenko
Copy link
Collaborator

@okramarenko okramarenko commented Feb 23, 2026

Note

High Risk
High risk due to a major EF Core/.NET upgrade (net8→net9) plus substantial changes to query translation surface area (new DateDiff overloads, JSON overlaps, geometry nullability/type-mapping tweaks) and server-version detection APIs which can affect runtime behavior.

Overview
Moves the provider/testing stack to EF Core 9 and .NET 9. CI workflows now run on PRs and main, install .NET 9.0.101, and execute unit/integration/functional tests against net9.0 (scripts updated; functional test blocks extended with additional ad-hoc tests).

Switches to central package version management and bumps dependencies. Removes Dependencies.targets/Directory.Build.targets, adds Directory.Packages.props (EF Core [9.0.0,9.0.999], SingleStoreConnector 1.3.0, updated xUnit/Roslyn/etc.), and updates projects to rely on centrally-managed PackageReferences.

Expands/adjusts provider APIs and translations. Adds many new SingleStoreDbFunctionsExtensions.DateDiff* overloads (quarter/week/millisecond/tick/nanosecond) and updates docs, introduces EF.Functions.JsonOverlaps with SQL translation, adds async ServerVersion.AutoDetectAsync overloads (plus SingleStoreDataSource support) and makes default UTF8 collations server-specific, ensures UseSingleStore(...) defaults to translating parameterized collections to constants, and adds charset support for complex type properties in design-time code generation.

Misc compatibility fixes. Updates NTS member translators’ null-constant type mapping for EF Core 9, removes Microsoft.Bcl.HashCode references in extension packages, and suppresses new warnings (EF9100, CS1591) in EFCore.SingleStore.

Written by Cursor Bugbot for commit bd3c985. This will update automatically on new commits. Configure here.

Copy link

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

This pull request upgrades the SingleStore EF Core provider from EF Core 8 to EF Core 9. This is a major version upgrade that includes updating the .NET SDK to 9.0, updating all EF Core package dependencies to 9.0.0, and adapting to breaking changes in the EF Core 9 API surface.

Changes:

  • Updated .NET SDK from 8.0 to 9.0 and target framework for tests from net8.0 to net9.0
  • Updated EF Core dependencies from 8.0.13 to 9.0.0 and SingleStoreConnector from 1.2.0 to 1.3.0
  • Converted synchronous test methods to async patterns throughout the test suite
  • Adapted to EF Core 9 API changes including query compilation context, parameter processors, and expression handling
  • Implemented new EF Core 9 features like migration database locking and precompiled query infrastructure
  • Fixed various bugs in regex patterns, variable naming, and expression handling
  • Added new test attributes and query translation methods

Reviewed changes

Copilot reviewed 148 out of 212 changed files in this pull request and generated no comments.

Show a summary per file
File Description
global.json, Version.props, Directory.Packages.props Updated SDK version to 9.0.100, package versions to EF Core 9.0.0
Multiple test files Converted test fixtures to IAsyncLifetime, changed sync methods to async
Query/Internal/*.cs Updated query compilation context and parameter processor signatures for EF Core 9
Query/ExpressionVisitors/*.cs Added bitwiseexpression visitor, updated expression handling
Migrations/Internal/*.cs Implemented migration database locking, updated constructor signatures
Storage/Internal/*.cs Fixed connection cloning to mark as owned
Infrastructure/*.cs Added DefaultUtf8 collation properties, updated server version support
Extensions/*.cs Added JsonOverlaps function, ComplexTypeProperty extensions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

</ItemGroup>

<ItemGroup>
<PackageReference Include="SingleStoreConnector" Version="1.2.0" />
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented-out PackageVersion breaks central package management build

High Severity

EFCore.SingleStore.csproj still references Microsoft.Bcl.HashCode as a PackageReference (line 49), but its corresponding PackageVersion entry in Directory.Packages.props is commented out. With ManagePackageVersionsCentrally set to true, NuGet restore will fail when building with LocalEFCoreRepository set, since no version is defined for this package. The other three projects correctly removed this reference.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants