WIP: Add EF Core packages and create DbContext with entity configurations #68
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
in progress
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
joezombie/castr!68
Loading…
Reference in a new issue
No description provided.
Delete branch "copilot/add-ef-core-packages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements foundational Entity Framework Core infrastructure for migrating from ADO.NET to EF Core. Part of the EF Core migration epic (#58).
Packages Added
Six EF Core 9.0.0 packages to support multiple database providers:
Microsoft.EntityFrameworkCore,Microsoft.EntityFrameworkCore.DesignEntity Models
Created 5 entity classes in
Data/Entities/mapping to existing SQLite schema:Feed- feed configuration with YouTube settingsEpisode- episode metadata with fuzzy match scoresDownloadedVideo- download tracking with composite unique constraintActivityLog- activity monitoring with optional feed referenceDownloadQueueItem- download queue stateAll entities include navigation properties for EF relationships.
Entity Configurations
Fluent API configurations in
Data/Configurations/preserve existing schema:(feed_id, filename),(feed_id, display_order),(feed_id, video_id)Feed.Nameand(FeedId, VideoId)for downloadsExample configuration:
DbContext Registration
Registered
CastrDbContextin DI container with temporary SQLite configuration using same path as existingCentralDatabaseService:Enables side-by-side operation during migration without schema conflicts.
Testing
Added 9 tests covering entity CRUD, relationships, constraints, and cascade deletes. All tests use in-memory SQLite databases for isolation.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Pull request closed