using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.EnterpriseServices;
namespace DBFactory
{
    /// <summary>
    /// DBFactory是产生操作数据库相关对象的抽象工厂，可以产生数据库联接、数据库命令、数据适配器
    /// </summary>
    public abstract  class DBFactory
    {
        public abstract IDbConnection GetDBConnection();
        public abstract IDbTransaction GetDBTransaction(IsolationLevel LockAction);
        public abstract IDbCommand GetDBCommand();
        public abstract IDbCommand GetDBCommand(string cmdText,IDbConnection conn);
        public abstract IDbDataAdapter GetDataAdapter(IDbCommand dbc);
        public abstract IDbDataAdapter GetDataAdapter();
        public abstract IDbDataParameter GetParameter();
        public abstract IDbDataParameter GetParameter(string ParameterName,DbType dbtype);
        public abstract IDataReader GetDataReader(IDbCommand dbc);
    }
}
