diff --git a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj index 14ddfdbde..ac75315bc 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj +++ b/AdminUI/LearningHub.Nhs.AdminUI/LearningHub.Nhs.AdminUI.csproj @@ -1,17 +1,13 @@  - - net6.0 - 1.0.0.0 - 1.0.0.0 - 1.0.0 - 31abd8b9-4223-4ff3-896b-a46530c9e15c - /subscriptions/57c55d5f-78c1-4373-a021-ff8357548f51/resourceGroups/LearningHubNhsUk-AdminUI-Prod-RG/providers/microsoft.insights/components/LearningHubNhsUk-AdminUI-Prod - true - true - x64 - - + + net8.0 + 31abd8b9-4223-4ff3-896b-a46530c9e15c + /subscriptions/57c55d5f-78c1-4373-a021-ff8357548f51/resourceGroups/LearningHubNhsUk-AdminUI-Prod-RG/providers/microsoft.insights/components/LearningHubNhsUk-AdminUI-Prod + true + true + x64 + @@ -36,7 +32,39 @@ <_ContentIncludedByDefault Remove="bundleconfig.json" /> - + + + + + + + + + + + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + @@ -80,42 +108,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - diff --git a/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs b/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs index 99e425d86..81867365f 100644 --- a/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs +++ b/AdminUI/LearningHub.Nhs.AdminUI/ServiceCollectionExtension.cs @@ -196,6 +196,8 @@ public static void ConfigureServices(this IServiceCollection services, IConfigur // Auto Mapper Configurations var mappingConfig = new MapperConfiguration(mc => { + mc.AllowNullCollections = true; + mc.ShouldMapMethod = m => false; mc.AddProfile(new MappingProfile()); }); IMapper mapper = mappingConfig.CreateMapper(); diff --git a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj index 47744a321..c79a68e8e 100644 --- a/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj +++ b/LearningHub.Nhs.WebUI/LearningHub.Nhs.WebUI.csproj @@ -1,11 +1,11 @@  - net6.0 + net8.0 + InProcess 1.0.0.0 1.0.0.0 1.0.0 - InProcess a2ecb5d2-cf13-4551-9cb6-3d86dfbcf8ef true true @@ -104,10 +104,10 @@ - + - - + + @@ -133,7 +133,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all diff --git a/LearningHub.Nhs.WebUI/ServiceCollectionExtension.cs b/LearningHub.Nhs.WebUI/ServiceCollectionExtension.cs index f38503701..aa90f135e 100644 --- a/LearningHub.Nhs.WebUI/ServiceCollectionExtension.cs +++ b/LearningHub.Nhs.WebUI/ServiceCollectionExtension.cs @@ -131,6 +131,7 @@ public static void ConfigureServices(this IServiceCollection services, IConfigur opt.DefaultExpiryInMinutes = 60; }); + services.AddControllersWithViews().AddNewtonsoftJson(); services.AddControllersWithViews().AddRazorRuntimeCompilation(); services.AddFeatureManagement(); diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj index e7faef3dd..c2d722a2e 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Models/LearningHub.Nhs.OpenApi.Models.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 true enable x64 diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj index 12c0510c1..ab98388ad 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories.Interface/LearningHub.Nhs.OpenApi.Repositories.Interface.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 LearningHub.Nhs.OpenApi.Repositories.Interface enable true diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/EntityFramework/ServiceMappings.cs b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/EntityFramework/ServiceMappings.cs index 8db1cd876..8129bc9c8 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/EntityFramework/ServiceMappings.cs +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/EntityFramework/ServiceMappings.cs @@ -24,7 +24,13 @@ public static class ServiceMappings /// The IServiceCollection. public static void ConfigureAutomapper(this IServiceCollection services) { - var mappingConfig = new MapperConfiguration(mc => { mc.AddProfile(new MappingProfile()); }); + var mappingConfig = new MapperConfiguration(mc => + { + mc.AllowNullCollections = true; + mc.ShouldMapMethod = m => false; + mc.AddProfile(new MappingProfile()); + }); + IMapper mapper = mappingConfig.CreateMapper(); services.AddSingleton(mapper); } diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj index 04fdc5493..bdd370fd8 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Repositories/LearningHub.Nhs.OpenApi.Repositories.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 LearningHub.Nhs.OpenApi.Repositories enable true diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj index 38a5e9711..58b11f5d1 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services.Interface/LearningHub.Nhs.OpenApi.Services.Interface.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 enable true x64 diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj index 3524cb9e4..31451e78f 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Services/LearningHub.Nhs.OpenApi.Services.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 LearningHub.Nhs.OpenApi.Services enable true @@ -22,12 +22,12 @@ - + - + diff --git a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj index 8b4bb1c88..6d5aad53f 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi.Tests/LearningHub.Nhs.OpenApi.Tests.csproj @@ -1,7 +1,7 @@ - net6.0 + net8.0 false enable x64 diff --git a/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj b/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj index 2702cc7e4..0cf25231a 100644 --- a/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj +++ b/OpenAPI/LearningHub.Nhs.OpenApi/LearningHub.NHS.OpenAPI.csproj @@ -2,7 +2,7 @@ enable - net6.0 + net8.0 true x64 @@ -27,7 +27,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj index 6d8538c7c..ad6fd8993 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services.Interface/LearningHub.Nhs.ReportApi.Services.Interface.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 enable enable @@ -16,7 +16,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj index c9fa3106c..c9394fb06 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services.UnitTests/LearningHub.Nhs.ReportApi.Services.UnitTests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 enable enable @@ -18,7 +18,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj index c116ea9d9..b41503f69 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Services/LearningHub.Nhs.ReportApi.Services.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 enable enable @@ -19,7 +19,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj b/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj index 619335ab9..9c05c4ac0 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi.Shared/LearningHub.Nhs.ReportApi.Shared.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 enable enable $(NoWarn),1573,1591,1712 @@ -17,7 +17,7 @@ - + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj index 959a3e17f..e45dcf794 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj +++ b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj @@ -1,50 +1,57 @@  - - net6.0 - 1.0.0.0 + + net8.0 + 1.0.0.0 1.0.0.0 1.0.0 - enable - enable - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - - - + enable + enable + False + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + PreserveNewest + true + PreserveNewest + + + + + + PreserveNewest + + + + + + diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj.user b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj.user new file mode 100644 index 000000000..7571e14ce --- /dev/null +++ b/ReportAPI/LearningHub.Nhs.ReportApi/LearningHub.Nhs.ReportApi.csproj.user @@ -0,0 +1,9 @@ + + + + ProjectDebugger + + + IIS Local + + \ No newline at end of file diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/Properties/launchSettings.json b/ReportAPI/LearningHub.Nhs.ReportApi/Properties/launchSettings.json index 416233779..514fff299 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/Properties/launchSettings.json +++ b/ReportAPI/LearningHub.Nhs.ReportApi/Properties/launchSettings.json @@ -1,23 +1,14 @@ -{ - "$schema": "https://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:30505", - "sslPort": 44345 - } - }, +{ "profiles": { "LearningHub.Nhs.ReportingServiceApi": { "commandName": "Project", - "dotnetRunMessages": true, "launchBrowser": true, "launchUrl": "swagger", - "applicationUrl": "https://localhost:7137;http://localhost:5137", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" - } + }, + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:7137;http://localhost:5137" }, "IIS Express": { "commandName": "IISExpress", @@ -26,6 +17,27 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } + }, + "IIS Local": { + "commandName": "IIS", + "launchBrowser": true, + "launchUrl": "https://lh-report.dev.local", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + }, + "$schema": "https://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iis": { + "applicationUrl": "https://lh-report.dev.local", + "sslPort": 0 + }, + "iisExpress": { + "applicationUrl": "http://localhost:30505", + "sslPort": 44345 } } -} +} \ No newline at end of file diff --git a/ReportAPI/LearningHub.Nhs.ReportApi/ServiceMappings.cs b/ReportAPI/LearningHub.Nhs.ReportApi/ServiceMappings.cs index f68b7ab52..250359dc1 100644 --- a/ReportAPI/LearningHub.Nhs.ReportApi/ServiceMappings.cs +++ b/ReportAPI/LearningHub.Nhs.ReportApi/ServiceMappings.cs @@ -78,6 +78,8 @@ private static void AddAutomapper(this IServiceCollection services) { services.AddSingleton(new MapperConfiguration(mc => { + mc.AllowNullCollections = true; + mc.ShouldMapMethod = m => false; mc.AddProfile(new MappingProfile()); }).CreateMapper()); } diff --git a/WebAPI/LearningHub.Nhs.API/Controllers/CatalogueController.cs b/WebAPI/LearningHub.Nhs.API/Controllers/CatalogueController.cs index b5dbf58a9..814d16dd4 100644 --- a/WebAPI/LearningHub.Nhs.API/Controllers/CatalogueController.cs +++ b/WebAPI/LearningHub.Nhs.API/Controllers/CatalogueController.cs @@ -103,7 +103,7 @@ public IActionResult GetCataloguesForCurrentUser() /// The actionResult. [HttpPost] [Route("Catalogues")] - public async Task CreateCatalogue(CatalogueViewModel viewModel) + public async Task CreateCatalogue([FromBody] CatalogueViewModel viewModel) { try { diff --git a/WebAPI/LearningHub.Nhs.API/Controllers/ResourceController.cs b/WebAPI/LearningHub.Nhs.API/Controllers/ResourceController.cs index 83ba526b3..3778effe2 100644 --- a/WebAPI/LearningHub.Nhs.API/Controllers/ResourceController.cs +++ b/WebAPI/LearningHub.Nhs.API/Controllers/ResourceController.cs @@ -87,7 +87,7 @@ public async Task GetAsync(int id) /// The . [HttpPost] [Route("CreateResource")] - public async Task CreateResourceAsync(ResourceDetailViewModel viewModel) + public async Task CreateResourceAsync([FromBody] ResourceDetailViewModel viewModel) { var vr = await this.resourceService.CreateResourceAsync(viewModel, this.CurrentUserId); if (vr.IsValid) @@ -367,7 +367,7 @@ public async Task RevertToDraft([FromBody] int resourceVersionId) [HttpPost] [Authorize(Policy = "ReadWrite")] [Route("UpdateResourceVersion")] - public async Task UpdateResourceVersionAsync(ResourceDetailViewModel resourceDetailViewModel) + public async Task UpdateResourceVersionAsync([FromBody] ResourceDetailViewModel resourceDetailViewModel) { var vr = await this.resourceService.UpdateResourceVersionAsync(resourceDetailViewModel, this.CurrentUserId); @@ -732,7 +732,7 @@ public async Task GetArticleDetailsAsync(int resourceVersionId) /// The . [HttpPost] [Route("UpdateArticleDetail")] - public async Task UpdateArticleDetailAsync(ArticleUpdateRequestViewModel articleViewModel) + public async Task UpdateArticleDetailAsync([FromBody] ArticleUpdateRequestViewModel articleViewModel) { var vr = await this.resourceService.UpdateArticleDetailAsync(articleViewModel, this.CurrentUserId); diff --git a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj index 6a57923bd..2c39ba754 100644 --- a/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj +++ b/WebAPI/LearningHub.Nhs.API/LearningHub.Nhs.Api.csproj @@ -1,70 +1,64 @@  - - - net6.0 - 1.0.0.0 + + net8.0 + 1.0.0.0 1.0.0.0 1.0.0 - InProcess - 234b55ad-984b-47ae-9d7a-71e372e6ded7 - true - x64 - - - - LearningHub.Nhs.Api.xml - + InProcess + 234b55ad-984b-47ae-9d7a-71e372e6ded7 + true + x64 + - - - + + LearningHub.Nhs.Api.xml + - - - Always - - + + + - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - + + + Always + + - - - - - - - - - + + + + + + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + - - - + + + + + + + + + - - - - - + + + + diff --git a/WebAPI/LearningHub.Nhs.API/ServiceCollectionExtension.cs b/WebAPI/LearningHub.Nhs.API/ServiceCollectionExtension.cs index 58095800b..220031b0a 100644 --- a/WebAPI/LearningHub.Nhs.API/ServiceCollectionExtension.cs +++ b/WebAPI/LearningHub.Nhs.API/ServiceCollectionExtension.cs @@ -56,9 +56,12 @@ public static void ConfigureServices(this IServiceCollection services, IConfigur // Auto Mapper Configurations var mappingConfig = new MapperConfiguration(mc => { + mc.AllowNullCollections = true; + mc.ShouldMapMethod = m => false; mc.AddProfile(new MappingProfile()); mc.AddProfile(new ElfhMappingProfile()); }); + IMapper mapper = mappingConfig.CreateMapper(); services.AddSingleton(mapper); diff --git a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj index fa26a95ea..c21e9b0aa 100644 --- a/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj +++ b/WebAPI/LearningHub.Nhs.Api.Shared/LearningHub.Nhs.Api.Shared.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true x64 @@ -10,7 +10,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj index 17b974e8b..c69582a15 100644 --- a/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Api.UnitTests/LearningHub.Nhs.Api.UnitTests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true false x64 diff --git a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj index b44a4bb5b..196d4856f 100644 --- a/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Repository.Interface/LearningHub.Nhs.Repository.Interface.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true x64 @@ -10,9 +10,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj index a94854e89..48c5dcbfa 100644 --- a/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj +++ b/WebAPI/LearningHub.Nhs.Repository/LearningHub.Nhs.Repository.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true x64 diff --git a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj index aa9b8c854..9789783d8 100644 --- a/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj +++ b/WebAPI/LearningHub.Nhs.Services.Interface/LearningHub.Nhs.Services.Interface.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true x64 @@ -15,9 +15,9 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj index c8970073f..72718179d 100644 --- a/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj +++ b/WebAPI/LearningHub.Nhs.Services.UnitTests/LearningHub.Nhs.Services.UnitTests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true false x64 diff --git a/WebAPI/LearningHub.Nhs.Services/AzureDataFactoryService.cs b/WebAPI/LearningHub.Nhs.Services/AzureDataFactoryService.cs index 52226631a..3bb2008d1 100644 --- a/WebAPI/LearningHub.Nhs.Services/AzureDataFactoryService.cs +++ b/WebAPI/LearningHub.Nhs.Services/AzureDataFactoryService.cs @@ -158,7 +158,7 @@ protected virtual void Dispose(bool disposing) } /// - /// Get AzureMedia Credentials. + /// Get AzureMedia Credentials.wwedzx /// /// The . private async Task GetCredentialsAsync() diff --git a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj index c1db140fe..0aaf94e88 100644 --- a/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj +++ b/WebAPI/LearningHub.Nhs.Services/LearningHub.Nhs.Services.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true x64 @@ -11,7 +11,7 @@ - + @@ -23,7 +23,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/WebAPI/LearningHub.Nhs.Services/UserService.cs b/WebAPI/LearningHub.Nhs.Services/UserService.cs index 65ecfdd52..5ea126ecb 100644 --- a/WebAPI/LearningHub.Nhs.Services/UserService.cs +++ b/WebAPI/LearningHub.Nhs.Services/UserService.cs @@ -1,5 +1,6 @@ namespace LearningHub.Nhs.Services { + using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -188,8 +189,15 @@ public async Task GetByUsernameAsync(string userName) /// The . public async Task GetByIdAsync(int id) { - var user = await this.userRepository.GetByIdAsync(id); - return this.mapper.Map(user); + try + { + var user = await this.userRepository.GetByIdAsync(id); + return this.mapper.Map(user); + } + catch (Exception ex) + { + return null; + } } /// diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj index 22f02c0cf..0bd6cf916 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.ConsoleApp/LearningHub.Nhs.Migration.ConsoleApp.csproj @@ -2,7 +2,7 @@ Exe - net6.0 + net8.0 7.3 true x64 diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj index 8a45f5232..727a72688 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Interface/LearningHub.Nhs.Migration.Interface.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true x64 diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj index 64a326d3b..22a6858ad 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Models/LearningHub.Nhs.Migration.Models.csproj @@ -1,18 +1,18 @@  - net6.0 + net8.0 true x64 - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj index 226acf08a..31a6d49b3 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.Staging.Repository/LearningHub.Nhs.Migration.Staging.Repository.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true x64 diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj index 70df59e57..0eed34ce1 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration.UnitTests/LearningHub.Nhs.Migration.UnitTests.csproj @@ -1,7 +1,7 @@  - net6.0 + net8.0 true false x64 diff --git a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj index fb53d0e90..26b9a6a0c 100644 --- a/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj +++ b/WebAPI/MigrationTool/LearningHub.Nhs.Migration/LearningHub.Nhs.Migration.csproj @@ -1,30 +1,30 @@  - - net6.0 - true - x64 - + + net8.0 + true + x64 + - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + - - - - - - - + + + + + + +