50 lines
970 B
C#
50 lines
970 B
C#
![]() |
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Configuration;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace Epost.DAL
|
|||
|
{
|
|||
|
public class DB_Oracle
|
|||
|
{
|
|||
|
private DataBaseOpration.OprationOraDAL db;
|
|||
|
private string _strOracleMIDConnString = ConfigurationManager.ConnectionStrings["OraMidConnString"].ConnectionString;
|
|||
|
|
|||
|
public DB_Oracle()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
/// <summary>
|
|||
|
|
|||
|
/// 此方法是本类实例的唯一全局访问点
|
|||
|
|
|||
|
/// (双重加锁 Double-Check Locking)
|
|||
|
|
|||
|
/// </summary>
|
|||
|
|
|||
|
/// <returns></returns>
|
|||
|
|
|||
|
public DataBaseOpration.OprationOraDAL GetInstance()
|
|||
|
{
|
|||
|
|
|||
|
//如实例不存在,则New一个新实例,否则返回已有实例
|
|||
|
if (db == null)
|
|||
|
{
|
|||
|
|
|||
|
db = new DataBaseOpration.OprationOraDAL(_strOracleMIDConnString);
|
|||
|
|
|||
|
}
|
|||
|
return db;
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|