Example #1
0
        private static SimpleTransaction CreateTransaction(Database database)
        {
            var adapterWithTransactions = database.GetAdapter() as IAdapterWithTransactions;

            if (adapterWithTransactions == null)
            {
                throw new NotSupportedException();
            }
            return(new SimpleTransaction(adapterWithTransactions, database));
        }
Example #2
0
 private static SimpleTransaction CreateTransaction(Database database, IsolationLevel isolationLevel = IsolationLevel.Unspecified)
 {
     var adapterWithTransactions = database.GetAdapter() as IAdapterWithTransactions;
     if (adapterWithTransactions == null) throw new NotSupportedException();
     return new SimpleTransaction(adapterWithTransactions, database, isolationLevel);
 }
Example #3
0
 private static SimpleTransaction CreateTransaction(Database database)
 {
     var adapterWithTransactions = database.GetAdapter() as IAdapterWithTransactions;
     if (adapterWithTransactions == null) throw new NotSupportedException();
     return new SimpleTransaction(adapterWithTransactions, database);
 }