diff --git a/PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs b/PxWeb/Code/Api2/DataSource/Cnmm/CnmmDataSource.cs
index 25d57622..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))
{
@@ -221,8 +220,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)
{
@@ -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))
{
@@ -243,8 +241,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 @@
-
+