示例#1
0
        public virtual SQTransaction OpenTransaction()
        {
            SQAdapter adp = (SQAdapter)Activator.CreateInstance(GetType());

            adp._Connection = CreateConnection();
            adp._Connection.Open();
            adp.Transaction = adp._Connection.BeginTransaction();
            SQTransaction trans = new SQTransaction(adp, adp.Transaction);

            trans.OnClose += new SQTransaction.CloseHandler(adp.Transaction_Close);
            return(trans);
        }
示例#2
0
 public static void SetSecondaryAdapter(SQAdapter adp)
 {
     SecondaryInstance = adp;
 }
示例#3
0
 protected virtual SQTransaction OpenTransaction(SQAdapter adp, DbTransaction trans)
 {
     return(new SQTransaction(adp, trans));
 }
示例#4
0
 public static void SetAdapter(SQAdapter adp)
 {
     Instance = adp;
 }