CsharpTemplate/ConsoleTemplate/Conf.cs

27 lines
712 B
C#
Raw Normal View History

2023-10-27 19:00:41 +07:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ConsoleTemplate.Repositories;
using Microsoft.Extensions.Configuration;
namespace ConsoleTemplate
{
internal static class Conf
{
public static string DB_SCHEME = "testdb";
public static string OTHER_CONF = "";
public static void Load(IRepository rorepository, IConfiguration config)
{
// Read config
if (config.GetValue<string>("Const:db_scheme") != null)
DB_SCHEME = config.GetValue<string>("Const:db_scheme");
//Read DB
// OTHER_CONF = _repo.GetConf("other");
}
}
}