27 lines
745 B
C#
27 lines
745 B
C#
|
|
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;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|