Conversation
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.
|
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! |
|
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 :) |
There was a problem hiding this comment.
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.0and update EF Core / related package references to 10.x. - Update repository
Update/UpdateAsyncbulk-update method signatures to useAction<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.
samples/EntityFrameworkCore.WebAPI/Swagger/Options/ConfigureSwaggerOptions.cs
Outdated
Show resolved
Hide resolved
samples/EntityFrameworkCore.WebAPI/Swagger/Filters/SwaggerDefaultValues.cs
Show resolved
Hide resolved
samples/EntityFrameworkCore.WebAPI/Swagger/Filters/SwaggerDefaultValues.cs
Outdated
Show resolved
Hide resolved
| public async Task InitializeAsync() | ||
| { | ||
| // Start the PostgreSQL container | ||
| await _postgresContainer.StartAsync(); | ||
|
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
…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>
There was a problem hiding this comment.
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.
Added support for .NET 10 and Entity Framework Core 10.