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)); } }
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)); } }
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)); } }
/// <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)); } }