From 006e3b612e8f2bbd09476d7a6cd4f100fad29e0c Mon Sep 17 00:00:00 2001 From: likp Date: Fri, 13 Dec 2024 11:59:40 +0100 Subject: [PATCH 1/2] Upgraded PcAxis.Sql nuget to 1.2.5 --- PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs | 8 ++++---- PxWeb/PxWeb.csproj | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs b/PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs index 25d57622..aaee73b9 100644 --- a/PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs +++ b/PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs @@ -221,8 +221,8 @@ private static bool IsInteger(string value) id = id.Substring(4); } - PCAxis.Sql.Repositories.GroupingRepository repo = new PCAxis.Sql.Repositories.GroupingRepository(cnmmOptions.DatabaseID); - PCAxis.Sql.Models.Grouping grouping = repo.GetGrouping(id, language); + var util = new PCAxis.Sql.ApiUtils.ApiUtil(); + PCAxis.Sql.Models.Grouping grouping = util.GetGrouping(id, language); if (grouping != null) { @@ -243,8 +243,8 @@ private static bool IsInteger(string value) id = id.Substring(3); } - PCAxis.Sql.Repositories.ValueSetRepository repo = new PCAxis.Sql.Repositories.ValueSetRepository(cnmmOptions.DatabaseID); - PCAxis.Sql.Models.ValueSet valueset = repo.GetValueSet(id, language); + var util = new PCAxis.Sql.ApiUtils.ApiUtil(); + PCAxis.Sql.Models.ValueSet valueset = util.GetValueSet(id, language); if (valueset != null) { diff --git a/PxWeb/PxWeb.csproj b/PxWeb/PxWeb.csproj index bf3286ad..15051712 100644 --- a/PxWeb/PxWeb.csproj +++ b/PxWeb/PxWeb.csproj @@ -50,7 +50,7 @@ - + From 044e20eeeee272d42aa65814ca41f0025e1a3df5 Mon Sep 17 00:00:00 2001 From: likp Date: Fri, 13 Dec 2024 12:05:49 +0100 Subject: [PATCH 2/2] Removed local cnmmOptions that was not used --- PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs b/PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs index aaee73b9..a5609004 100644 --- a/PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs +++ b/PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs @@ -213,7 +213,6 @@ private static bool IsInteger(string value) private Codelist? GetGrouping(string id, string language) { Codelist? codelist = null; - var cnmmOptions = _cnmmConfigurationService.GetConfiguration(); if (id.StartsWith("agg_", System.StringComparison.InvariantCultureIgnoreCase)) { @@ -235,7 +234,6 @@ private static bool IsInteger(string value) private Codelist? GetValueset(string id, string language) { Codelist? codelist = null; - var cnmmOptions = _cnmmConfigurationService.GetConfiguration(); if (id.StartsWith("vs_", System.StringComparison.InvariantCultureIgnoreCase)) {