using Dapper; using Microsoft.Data.SqlClient; using Microsoft.Extensions.Configuration; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EVCB_OCPP.WSServer.Service; public class WebDbService { public WebDbService(IConfiguration configuration) { this.webConnectionString = configuration.GetConnectionString("WebDBContext"); } private readonly string webConnectionString; public async Task> GetDenyModelNames() { using SqlConnection conn = new SqlConnection(webConnectionString) ; string strSql = """ SELECT [Value] FROM [StandardOCPP_Web].[dbo].[KernelConfig] where SystemKey = 'DenyModelNames'; """; var result = await conn.QueryFirstOrDefaultAsync(strSql); return result.Split(',').ToList(); } }