From dd65df07627b1bbc77dcb6e9c97c517299895367 Mon Sep 17 00:00:00 2001 From: Oluwatobi Awe Date: Tue, 1 Jul 2025 11:39:33 +0100 Subject: [PATCH] db mapping update --- .../EntityFramework/ServiceMappings.cs | 6 +- .../Services/ResourceService.cs | 117 +++++++++--------- 2 files changed, 65 insertions(+), 58 deletions(-) diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/EntityFramework/ServiceMappings.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/EntityFramework/ServiceMappings.cs index 2384dc4d..a3a35abc 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/EntityFramework/ServiceMappings.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/EntityFramework/ServiceMappings.cs @@ -10,7 +10,8 @@ namespace LearningHub.Nhs.OpenApi.Repositories.EntityFramework using LearningHub.Nhs.OpenApi.Repositories.Map.Hierarchy; using LearningHub.Nhs.OpenApi.Repositories.Map.Maintenance; using LearningHub.Nhs.OpenApi.Repositories.Map.Messaging; - using LearningHub.Nhs.OpenApi.Repositories.Map.Resources; + using LearningHub.Nhs.OpenApi.Repositories.Map.Migrations; + using LearningHub.Nhs.OpenApi.Repositories.Map.Resources; using LearningHub.Nhs.OpenApi.Repositories.Map.Resources.Blocks; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; @@ -179,6 +180,9 @@ public static void AddLearningHubMappings(this IServiceCollection services, ICon services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); // External services.AddSingleton(); diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/ResourceService.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/ResourceService.cs index 07a55e53..caa66525 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/ResourceService.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/Services/ResourceService.cs @@ -112,63 +112,66 @@ public class ResourceService : IResourceService /// Initializes a new instance of the class. /// The search service. /// - /// Logger. - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// The . - /// - /// - /// - /// - /// - /// - /// - /// - /// The . - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// + /// + /// Initializes a new instance of the class. + /// + /// The logger instance. + /// The repository for web link resource versions. + /// The repository for case resource versions. + /// The repository for SCORM resource versions. + /// The repository for generic file resource versions. + /// The repository for all resource versions. + /// The repository for HTML resource versions. + /// The mapper for object-object mapping. + /// The repository for file storage and retrieval. + /// The Azure configuration settings. + /// The Learning Hub configuration settings. + /// The service to manage user profiles. + /// The repository for flags on resource versions. + /// The repository for article resource versions. + /// The repository for audio resource versions. + /// The repository for video resource versions. + /// The repository for assessment resource versions. + /// The repository for resource licences. + /// The repository for resource references. + /// The repository for user acceptance of resource versions. + /// The repository for catalogue node versions. + /// The service for caching data. + /// The service for resource search functionality. + /// The service to manage catalogues. + /// The repository for node-resource relationships. + /// The repository for node paths. + /// The service for user management. + /// The repository for nodes. + /// The service for syncing resources. + /// The repository for synced resources. + /// The repository for resource version events. + /// The database context instance. + /// The instance. + /// The service for file type operations. + /// The repository for block collections. + /// The service for internal system operations. + /// The repository for authors of resource versions. + /// The repository for file chunk details. + /// The service for queue communication. + /// The instance. + /// The repository for resource version providers. + /// The service for managing providers. + /// The repository for article resource version files. + /// The repository for publications. + /// The repository for migration sources. + /// The repository for question blocks. + /// The repository for video resources. + /// The repository for whole-slide images. + /// The repository for embedded resource versions. + /// The repository for equipment resource versions. + /// The repository for image resource versions. + /// The repository for bookmarks. + /// The repository for assessment activity-question matches. + /// The repository for resource version keywords. + /// The repository for validation results of resource versions. + + public ResourceService(ILearningHubService learningHubService, IFileTypeService fileTypeService, IBlockCollectionRepository blockCollectionRepository, IInternalSystemService internalSystemService, IResourceVersionAuthorRepository resourceVersionAuthorRepository, IFileChunkDetailRepository fileChunkDetailRepository, IQueueCommunicatorService queueCommunicatorService, IResourceRepository resourceRepository, IResourceVersionProviderRepository resourceVersionProviderRepository, IProviderService providerService, IArticleResourceVersionFileRepository articleResourceVersionFileRepository, IPublicationRepository publicationRepository, IMigrationSourceRepository migrationSourceRepository, IQuestionBlockRepository questionBlockRepository, IVideoRepository videoRepository, IWholeSlideImageRepository wholeSlideImageRepository, IEmbeddedResourceVersionRepository embeddedResourceVersionRepository, IEquipmentResourceVersionRepository equipmentResourceVersionRepository, IImageResourceVersionRepository imageResourceVersionRepository, IBookmarkRepository bookmarkRepository, IAssessmentResourceActivityMatchQuestionRepository assessmentResourceActivityMatchQuestionRepository, IResourceVersionKeywordRepository resourceVersionKeywordRepository, IResourceVersionValidationResultRepository resourceVersionValidationResultRepository, ILogger logger, IWebLinkResourceVersionRepository webLinkResourceVersionRepository, ICaseResourceVersionRepository caseResourceVersionRepository, IScormResourceVersionRepository scormResourceVersionRepository, IGenericFileResourceVersionRepository genericFileResourceVersionRepository, IResourceVersionRepository resourceVersionRepository, IHtmlResourceVersionRepository htmlResourceVersionRepository, IMapper mapper, IFileRepository fileRepository, IOptions azureConfig, IOptions learningHubConfig, IUserProfileService userProfileService, IResourceVersionFlagRepository resourceVersionFlagRepository, IArticleResourceVersionRepository articleResourceVersionRepository, IAudioResourceVersionRepository audioResourceVersionRepository, IVideoResourceVersionRepository videoResourceVersionRepository, IAssessmentResourceVersionRepository assessmentResourceVersionRepository, IResourceLicenceRepository resourceLicenceRepository, IResourceReferenceRepository resourceReferenceRepository, IResourceVersionUserAcceptanceRepository resourceVersionUserAcceptanceRepository, ICatalogueNodeVersionRepository catalogueNodeVersionRepository, ICachingService cachingService, ISearchService searchService, ICatalogueService catalogueService, INodeResourceRepository nodeResourceRepository, INodePathRepository nodePathRepository, IUserService userService, INodeRepository nodeRepository, IResourceSyncService resourceSyncService, IResourceSyncRepository resourceSyncRepository, IResourceVersionEventRepository resourceVersionEventRepository, LearningHubDbContext dbContext) { this.learningHubService = learningHubService;