Skip to content

Ef core 10#31

Open
turric4n wants to merge 6 commits intoffernandolima:ef-core-10from
turric4n:ef-core-10
Open

Ef core 10#31
turric4n wants to merge 6 commits intoffernandolima:ef-core-10from
turric4n:ef-core-10

Conversation

@turric4n
Copy link

Added support for .NET 10 and Entity Framework Core 10.

Upgraded all projects from .NET 9.0 to .NET 10.0, updating NuGet dependencies to their latest compatible versions. Refactored repository Update/UpdateAsync method signatures and implementations to use Action<UpdateSettersBuilder<T>> in line with EF Core 10's ExecuteUpdate API. Updated OpenAPI/Swagger integration for .NET 10 compatibility. Incremented project versions to 10.0.0 and modernized test dependencies. Adapted codebase to breaking changes in EF Core and related libraries.
Added integration tests for EF Core repositories using a real PostgreSQL database via Docker and Testcontainers. Updated test project dependencies to include Npgsql.EntityFrameworkCore.PostgreSQL and Testcontainers.PostgreSql. Introduced RepositoryIntegrationTests.cs with comprehensive coverage for bulk updates, inserts, and entity-based updates, supporting both sync and async operations. Enhanced README with detailed instructions for running and troubleshooting integration tests, and clarified the distinction between in-memory and real database testing. Integration tests are skipped if Docker is unavailable.
@ffernandolima ffernandolima changed the base branch from master to ef-core-10 February 24, 2026 17:36
@ffernandolima
Copy link
Owner

Hi,

Thank you for your contribution and for migrating the project to .NET 10 and EF Core 10 — I really appreciate the effort.

I updated your PR to target the ef-core-10 branch instead of the master branch.

Each version is maintained in a separate branch rather than in master, as we may still release bug fixes for older versions. Targeting the correct branch also makes it easier to track and review your changes.

Thanks again for your contribution!

@turric4n
Copy link
Author

Hi Fernando, nice to meet you and I want to thank you for this cool project. You are right about the branch I missed that :)

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 PR upgrades the solution to .NET 10 / EF Core 10, updates repository bulk-update APIs to match EF Core 10 ExecuteUpdate signatures, and adds PostgreSQL Testcontainers-based integration tests to validate bulk updates against a real database.

Changes:

  • Bump projects to net10.0 and update EF Core / related package references to 10.x.
  • Update repository Update / UpdateAsync bulk-update method signatures to use Action<UpdateSettersBuilder<T>>.
  • Add PostgreSQL + Testcontainers integration tests and accompanying test-project README; update Swagger/OpenAPI wiring for newer dependencies.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/EntityFrameworkCore.Tests/RepositoryIntegrationTests.cs Adds Docker/Testcontainers-based integration tests for bulk updates and CRUD behaviors.
tests/EntityFrameworkCore.Tests/README.md Documents how to run in-memory vs Docker-based integration tests.
tests/EntityFrameworkCore.Tests/EntityFrameworkCore.Tests.csproj Moves tests to net10.0 and adds Npgsql/Testcontainers dependencies.
src/EntityFrameworkCore.UnitOfWork/EntityFrameworkCore.UnitOfWork.csproj Targets net10.0 and bumps package version to 10.0.0.
src/EntityFrameworkCore.UnitOfWork.Abstractions/EntityFrameworkCore.UnitOfWork.Abstractions.csproj Targets net10.0 and bumps package version to 10.0.0.
src/EntityFrameworkCore.Repository/Repository.cs Adapts bulk-update APIs to EF Core 10 ExecuteUpdate delegate shape.
src/EntityFrameworkCore.Repository/EntityFrameworkCore.Repository.csproj Targets net10.0 and bumps package version to 10.0.0.
src/EntityFrameworkCore.Repository.Abstractions/Interfaces/ISyncRepository.cs Updates bulk-update API signature in abstractions.
src/EntityFrameworkCore.Repository.Abstractions/Interfaces/IAsyncRepository.cs Updates bulk-update API signature in abstractions.
src/EntityFrameworkCore.Repository.Abstractions/EntityFrameworkCore.Repository.Abstractions.csproj Targets net10.0 and bumps package version to 10.0.0.
src/EntityFrameworkCore.QueryBuilder/EntityFrameworkCore.QueryBuilder.csproj Targets net10.0, bumps package version and LinqKit dependency.
src/EntityFrameworkCore.QueryBuilder.Abstractions/EntityFrameworkCore.QueryBuilder.Abstractions.csproj Targets net10.0, bumps package version and EF Core relational dependency.
src/EntityFrameworkCore.AutoHistory/EntityFrameworkCore.AutoHistory.csproj Targets net10.0, bumps package version and EF Core relational dependency.
samples/EntityFrameworkCore.WebAPI/Swagger/Options/ConfigureSwaggerOptions.cs Adjusts OpenAPI/Swagger usings for newer packages (currently breaks type resolution).
samples/EntityFrameworkCore.WebAPI/Swagger/Filters/SwaggerDefaultValues.cs Adjusts OpenAPI schema default handling for newer packages (currently breaks type resolution and may coerce types).
samples/EntityFrameworkCore.WebAPI/EntityFrameworkCore.WebAPI.csproj Targets net10.0 and bumps EF Core provider + Swashbuckle dependencies.
samples/EntityFrameworkCore.Models/EntityFrameworkCore.Models.csproj Targets net10.0.
samples/EntityFrameworkCore.Data/EntityFrameworkCore.Data.csproj Targets net10.0.

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

Comment on lines +81 to +85
public async Task InitializeAsync()
{
// Start the PostgreSQL container
await _postgresContainer.StartAsync();

Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

InitializeAsync unconditionally starts the Docker container. If Docker isn't available/misconfigured, this will throw and fail the whole test run (contradicting the comment that tests are skipped automatically). Consider detecting Docker/Testcontainers availability and skipping these tests via xUnit's skip mechanism instead of failing.

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Copy link
Author

Choose a reason for hiding this comment

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

@copilot just mark this test as explicit then.

turric4n and others added 4 commits February 24, 2026 19:24
…ultValues.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…aggerOptions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ultValues.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.


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

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.

3 participants