251209_01_ENH: net ver 8로 높임, Contact 조회용 프로젝트 조회 API 추가

This commit is contained in:
2025-12-09 08:56:41 +09:00
parent 41c8125832
commit bef691913b
6 changed files with 99 additions and 14 deletions

View File

@@ -11,16 +11,6 @@ namespace REPORT_API_ver6.Services
{
static readonly log4net.ILog logger = log4net.LogManager.GetLogger(typeof(DAL));
/// <summary>
/// Config 파일 로드
/// </summary>
/// <returns></returns>
public IConfiguration GetConfiguration()
{
var builder = new ConfigurationBuilder().SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
return builder.Build();
}
/// <summary>
/// Report DB 연결
/// </summary>
@@ -30,7 +20,7 @@ namespace REPORT_API_ver6.Services
SqlConnection connection = new SqlConnection();
try
{
var configuration = GetConfiguration();
var configuration = Common.GetConfiguration();
connection.ConnectionString = configuration.GetSection("ConnectionStrings").GetSection("ReportString").Value;
connection.Open();
}
@@ -52,7 +42,7 @@ namespace REPORT_API_ver6.Services
string connectionString = string.Empty;
try
{
var configuration = GetConfiguration();
var configuration = Common.GetConfiguration();
if (isKiwi == 0)
{
@@ -82,7 +72,7 @@ namespace REPORT_API_ver6.Services
SqlConnection connection = new SqlConnection();
try
{
var configuration = GetConfiguration();
var configuration = Common.GetConfiguration();
connection.ConnectionString = configuration.GetSection("ConnectionStrings").GetSection("IntraString").Value;
connection.Open();
}