添加项目文件。
This commit is contained in:
49
Epost.DAL/DB_Oracle.cs
Normal file
49
Epost.DAL/DB_Oracle.cs
Normal file
@ -0,0 +1,49 @@
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user