Conversation
There was a problem hiding this comment.
Pull request overview
Updates the repository to build and test against newer .NET/EF Core versions by introducing centralized build/test configuration and package version management, and aligning tests/samples with updated APIs.
Changes:
- Multi-targets projects to
net8.0;net9.0;net10.0, addsglobal.json, and centralizes package versions inDirectory.Packages.props. - Simplifies test project
.csprojfiles by moving common test settings/references intotest/Directory.Build.props. - Updates tests and samples to newer xUnit assertions and async trigger interfaces/overloads.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/EntityFrameworkCore.Triggered.Transactions.Tests/TriggeredSessionExtensionsTests.cs | Uses Assert.Single for clearer invocation assertions. |
| test/EntityFrameworkCore.Triggered.Transactions.Tests/TriggeredDbContextTests.cs | Uses Assert.Single for trigger invocation assertions. |
| test/EntityFrameworkCore.Triggered.Transactions.Tests/EntityFrameworkCore.Triggered.Transactions.Tests.csproj | Removes local package versions to rely on central management. |
| test/EntityFrameworkCore.Triggered.Tests/TriggerSessionTests.cs | Replaces count assertions with Assert.Single/Assert.Empty. |
| test/EntityFrameworkCore.Triggered.Tests/TriggerServiceApplicationDependenciesTests.cs | Replaces count assertions with Assert.Single/Assert.Empty. |
| test/EntityFrameworkCore.Triggered.Tests/Infrastructure/ServiceCollectionExtensionsTests.cs | Updates assertions and adjusts AddTriggeredDbContextFactory overload usage. |
| test/EntityFrameworkCore.Triggered.Tests/EntityFrameworkCore.Triggered.Tests.csproj | Simplifies references; relies on shared test props/central packages. |
| test/EntityFrameworkCore.Triggered.Tests/EFCore5DbContextTests.cs | Uses Assert.Single for trigger invocation assertions. |
| test/EntityFrameworkCore.Triggered.IntegrationTests/EntityFrameworkCore.Triggered.IntegrationTests.csproj | Simplifies package refs and keeps project reference to extensions. |
| test/EntityFrameworkCore.Triggered.Extensions.Tests/TriggerContextOptionsBuilderExtensionsTests.cs | Uses Assert.DoesNotContain for clearer intent. |
| test/EntityFrameworkCore.Triggered.Extensions.Tests/ServiceCollectionExtensionsTests.cs | Uses Assert.DoesNotContain for clearer intent. |
| test/EntityFrameworkCore.Triggered.Extensions.Tests/EntityFrameworkCore.Triggered.Extensions.Tests.csproj | Simplifies package refs; relies on central management. |
| test/Directory.Build.props | Adds shared test TFMs + common test package references and a project reference. |
| src/EntityFrameworkCore.Triggered/EntityFrameworkCore.Triggered.csproj | Removes explicit EF Core version to rely on central management. |
| src/Directory.Build.props | Switches to multi-targeting net8/9/10 and centralizes SourceLink versioning. |
| samples/Directory.Build.props | Removes sample-specific version properties. |
| samples/4 - BlazorTests/Triggers/Counts/SetCreatedOn.cs | Migrates to async trigger interface/method name. |
| samples/4 - BlazorTests/Triggers/Counts/PublishCountAddedEvent.cs | Migrates to async trigger interface/method name. |
| samples/4 - BlazorTests/Startup.cs | Updates AddTriggeredDbContextFactory overload usage. |
| samples/4 - BlazorTests/4 - BlazorTests.csproj | Targets net10 and switches from package to project reference. |
| samples/3 - StudentManagerAspNetCore/Triggers/Traits/SoftDelete/EnsureSoftDelete.cs | Migrates to async trigger interface/method name. |
| samples/3 - StudentManagerAspNetCore/Triggers/Traits/Audited/CreateAuditRecord.cs | Migrates to async trigger interface/method name. |
| samples/3 - StudentManagerAspNetCore/Triggers/Students/SignupToMandatoryCourses.cs | Migrates to async trigger interface/method name. |
| samples/3 - StudentManagerAspNetCore/Triggers/Students/AssignRegistrationDate.cs | Migrates to async trigger interface/method name. |
| samples/3 - StudentManagerAspNetCore/Triggers/StudentCourses/SendWelcomingEmail.cs | Migrates to async trigger interface/method name. |
| samples/3 - StudentManagerAspNetCore/Triggers/StudentCourses/BlockRemovalWhenCourseIsMandatory.cs | Migrates to async trigger interface/method name. |
| samples/3 - StudentManagerAspNetCore/Triggers/Courses/AutoSignupStudents.cs | Migrates to async trigger interface/method name. |
| samples/3 - StudentManagerAspNetCore/3 - StudentManagerAspNetCore.csproj | Targets net10 and switches from package to project reference. |
| samples/2 - PrimarySchool/Triggers/StudentSignupToMandatoryCourses.cs | Migrates to async trigger interface/method name. |
| samples/2 - PrimarySchool/2 - PrimarySchool.csproj | Targets net10 and switches from package to project reference. |
| samples/1 - HelloWorld/Triggers/StudentAssignRegistrationDate.cs | Migrates to async trigger interface/method name. |
| samples/1 - HelloWorld/1 - HelloWorld.csproj | Targets net10 and switches from package to project reference. |
| global.json | Pins repository SDK selection to 10.0.100. |
| benchmarks/EntityFrameworkCore.Triggered.Benchmarks/EntityFrameworkCore.Triggered.Benchmarks.csproj | Moves to net10 and central package versions. |
| EntityFrameworkCore.Triggered.sln | Adds new props/central package files as solution items. |
| Directory.Packages.props | Introduces central package management with TFM-specific versions. |
| Directory.Build.props | Updates repo-wide language/version/build properties and formatting. |
Comments suppressed due to low confidence (1)
test/EntityFrameworkCore.Triggered.Tests/EntityFrameworkCore.Triggered.Tests.csproj:1
- With
test/Directory.Build.propsadding aProjectReferencetoEntityFrameworkCore.Triggered, this explicitProjectReferencecan become a duplicate once the props path is corrected. DuplicatedProjectReferenceitems can lead to noisy builds (duplicate item warnings) and makes dependencies harder to reason about. Prefer defining this reference in only one place: either remove it here and keep it centralized intest/Directory.Build.props, or remove the centralized reference and keep per-project references (or conditionally include it only for projects that need it).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
test/Directory.Build.props
Outdated
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\..\src\EntityFrameworkCore.Triggered\EntityFrameworkCore.Triggered.csproj" /> |
There was a problem hiding this comment.
The ProjectReference path is incorrect relative to test/Directory.Build.props. From the test folder, ..\\..\\src\\... resolves outside the repository and will fail to resolve the project. Change it to ..\\src\\EntityFrameworkCore.Triggered\\EntityFrameworkCore.Triggered.csproj.
| <ProjectReference Include="..\..\src\EntityFrameworkCore.Triggered\EntityFrameworkCore.Triggered.csproj" /> | |
| <ProjectReference Include="..\src\EntityFrameworkCore.Triggered\EntityFrameworkCore.Triggered.csproj" /> |
No description provided.