Exemple #1
0
        public static DataSet SelectDataSet(string sql, DBTran tran = null)
        {
            if (tran != null)
            {
                return(tran.DB.SelectDataSet(sql));
            }

            using (var d = PluginFactory.NewDB)
            {
                return(d.SelectDataSet(sql));
            }
        }
Exemple #2
0
        public static IEnumerable <DataRowAccessor> Select(string sql, DBTran tran = null)
        {
            if (tran != null)
            {
                return(tran.DB.Select(sql));
            }

            using (var d = PluginFactory.NewDB)
            {
                return(d.Select(sql));
            }
        }
Exemple #3
0
        public static TypeConvertableWrapper SelectOne(string sql, DBTran tran = null)
        {
            if (tran != null)
            {
                return(tran.DB.SelectOne(sql));
            }

            using (var d = PluginFactory.NewDB)
            {
                return(d.SelectOne(sql));
            }
        }
Exemple #4
0
        /// <summary>
        /// UPDATE,DELETEなどの結果を返さないSQLを実行します。
        /// </summary>
        /// <param name="sql">実行するSQL文字列</param>
        public static int Execute(string sql, DBTran tran = null)
        {
            if (tran != null)
            {
                return(tran.DB.Execute(sql));
            }

            using (var d = PluginFactory.NewDB)
            {
                return(d.Execute(sql));
            }
        }