Migrate services to use EF Core repositories #64
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#64
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Parent Epic
Part of #58 - Migrate to Entity Framework Core
Description
Update all existing services to use the new EF Core repositories instead of raw SQL database services.
Services to Update
1. PodcastFeedService
Current: Uses
IPodcastDatabaseServicefor episode orderingChange to: Use
IEpisodeRepository2. PlaylistWatcherService
Current: Uses both
IPodcastDatabaseServiceandICentralDatabaseServiceChange to: Use repositories via
IUnitOfWork3. YouTubeDownloadService
Current: May reference database services
Change to: Use download queue repository
4. Dashboard Blazor Components
Current: Inject
ICentralDatabaseServiceChange to: Inject repositories or a dashboard-specific service
Mapping Between Old and New
GetAllFeedsAsync()_feedRepository.GetAllAsync()GetFeedByNameAsync(name)_feedRepository.GetByNameAsync(name)GetEpisodesAsync(feedId)_episodeRepository.GetByFeedIdAsync(feedId)IsVideoDownloadedAsync(feedId, videoId)_downloadedVideoRepository.ExistsAsync(feedId, videoId)MarkVideoDownloadedAsync(...)_downloadedVideoRepository.AddAsync(...)LogActivityAsync(...)_activityLogRepository.LogAsync(...)AddToDownloadQueueAsync(...)_downloadQueueRepository.AddAsync(...)Files to Update
Services/PodcastFeedService.csServices/PlaylistWatcherService.csServices/YouTubeDownloadService.csComponents/Pages/Dashboard.razorComponents/Pages/Feeds/FeedList.razorComponents/Pages/Feeds/FeedDetails.razorComponents/Pages/Feeds/FeedEdit.razorComponents/Pages/Episodes/EpisodeList.razorComponents/Pages/Downloads.razorProgram.cs(DI registration)Tasks
Acceptance Criteria
Completed: All services now use EF Core repositories through IPodcastDataService.
Services Migrated:
Architecture:
All legacy services (PodcastDatabaseService, CentralDatabaseService) have been removed.