1
This commit is contained in:
26
LeadDataBaseUtility_/LeadConfigureConnectionString.cs
Normal file
26
LeadDataBaseUtility_/LeadConfigureConnectionString.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LeadDataBaseUtility
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取配置文件中的连接字符串
|
||||
/// </summary>
|
||||
public class LeadConfigureConnectionString
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取配置文件中的连接字符串
|
||||
/// </summary>
|
||||
/// <param name="connStrType">数据库连接字符串类型</param>
|
||||
/// <returns></returns>
|
||||
public static string getConnectionString(string connStrType)
|
||||
{
|
||||
string _connectionString = ConfigurationManager.AppSettings[connStrType];
|
||||
return _connectionString;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user