Phase 2: Data Layer Migration from Entity Framework 6.1.3 to Entity Framework Core #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Phase 2: Data Layer Migration from Entity Framework 6.1.3 to Entity Framework Core
Summary
This PR implements Phase 2 of the .NET Framework to .NET Core migration, migrating the DataLayer from Entity Framework 6.1.3 to Entity Framework Core 8.0. Building on the Phase 1 infrastructure, this adds the actual EF Core implementation with migrated entity classes, DbContext, and database initialization logic.
Key changes:
net8.0(required for EF Core 8.0)SampleWebAppDbCoreDbContext with change tracking viaTrackUpdatepatternOnModelCreatingDataLayerCoreInitialisefor database initialization andLoadDbDataFromXmlfor data seedingBuild status: Succeeded with 25 nullable reference type warnings (CS8618) - these are expected when migrating legacy code to nullable-enabled projects.
Review & Testing Checklist for Human
requiredmodifier or nullable annotationsRecommended test plan:
dotnet build SampleMvcWebApp.Core.sln --configuration Release- should succeed with warningsdotnet test SampleMvcWebApp.Core.sln- all 15 tests should passNotes
ValidateEntityoverride for Tag Slug uniqueness is now handled viaHasIndex().IsUnique()inOnModelCreatingLink to Devin run: https://app.devin.ai/sessions/88606214e3b14e1681a1d720b725fa31
Requested by: Abhay Aggarwal (abhay.aggarwal@cognition.ai) / @abhay-codeium