public DataSet ExecuteDataset(string statementName, IDataAccessSession session, List <StatementCondition> conditions, Hashtable paramMap) { Sql sql = DaoConfig.GetSql(statementName); ExecuteUnit unit = new ExecuteUnit(this, sql, session, conditions, paramMap); return(ExecuteDataset(unit)); }
public DataTable ExecuteDatatable(string statementName, IDataAccessSession session, List <StatementCondition> conditions, int startIndex, int endIndex, out int totalCount, IModel model) { Sql sql = DaoConfig.GetSql(statementName); ExecuteUnit unit = new ExecuteUnit(this, sql, session, conditions, model); return(ExecuteDatatable(unit, startIndex, endIndex, out totalCount)); }
public DataTable ExecuteDatatable(string statementName, IDataAccessSession session, List <StatementCondition> conditions, IModel model) { Sql sql = DaoConfig.GetSql(statementName); ExecuteUnit unit = new ExecuteUnit(this, sql, session, conditions, model); return(ExecuteDatatable(unit)); }
public int ExecuteNonQuery(string statementName, IDataAccessSession session, List <StatementCondition> conditions, params object[] parameters) { Sql sql = DaoConfig.GetSql(statementName); ExecuteUnit unit = new ExecuteUnit(this, sql, session, conditions, parameters); return(ExecuteNonQuery(unit)); }
public DataSet ExecuteDataset(string statementName, IDataAccessSession session, List <StatementCondition> conditions, int startIndex, int endIndex, out int totalCount, Hashtable paramMap) { Sql sql = DaoConfig.GetSql(statementName); ExecuteUnit unit = new ExecuteUnit(this, sql, session, conditions, paramMap); return(ExecuteDataset(unit, startIndex, endIndex, out totalCount)); }
public T Query <T>(string statementName, IDataAccessSession session, List <StatementCondition> conditions, Hashtable paramMap) where T : new() { Sql sql = DaoConfig.GetSql(statementName); ExecuteUnit unit = new ExecuteUnit(this, sql, session, conditions, paramMap); return(Query <T>(unit)); }
public ModelCollection <T> QueryCollection <T>(string statementName, IDataAccessSession session, List <StatementCondition> conditions, IModel model) where T : new() { Sql sql = DaoConfig.GetSql(statementName); ExecuteUnit unit = new ExecuteUnit(this, sql, session, conditions, model); return(QueryCollection <T>(unit)); }
public PagerModelCollection <T> QueryCollection <T>(string statementName, IDataAccessSession session, List <StatementCondition> conditions, int startIndex, int endIndex, Hashtable paramMap) where T : new() { Sql sql = DaoConfig.GetSql(statementName); ExecuteUnit unit = new ExecuteUnit(this, sql, session, conditions, paramMap); return(QueryCollection <T>(unit, startIndex, endIndex)); }
public T Query <T>(string statementName, IDataAccessSession session, List <StatementCondition> conditions, params object[] parameters) where T : new() { Sql sql = DaoConfig.GetSql(statementName); ExecuteUnit unit = new ExecuteUnit(this, sql, session, null, parameters); return(Query <T>(unit)); }
private ModelCollection <T> QueryCollection <T>(ExecuteUnit unit) where T : new() { DataTable dt = this.DataHelper.ExecuteDataTable(unit.CommandText, unit.Session, unit.DbParams.ToArray()); ModelCollection <T> coll = new ModelCollection <T>(); Type elementType = coll.ElementType; foreach (DataRow row in dt.Rows) { T model = DataRowToT <T>(row); coll.Add(model); } return(coll); }
private T Query <T>(ExecuteUnit unit) where T : new() { DataTable dt = this.DataHelper.ExecuteDataTable(unit.CommandText, unit.Session, unit.DbParams.ToArray()); if (dt.Rows.Count == 0) { return(default(T)); } DataRow row = dt.Rows[0]; T model = new T(); this.FillModelValues(model, row); return(model); }
private PagerModelCollection <T> QueryCollection <T>(ExecuteUnit unit, int startIndex, int endIndex) where T : new() { int totalCount; DataTable dt = this.DataHelper.ExecuteDataTable(unit.CommandText, unit.Session, startIndex, endIndex, out totalCount, unit.DbParams.ToArray()); PagerModelCollection <T> coll = new PagerModelCollection <T>(startIndex, endIndex, totalCount); Type elementType = coll.ElementType; foreach (DataRow row in dt.Rows) { T model = DataRowToT <T>(row); coll.Add(model); } return(coll); }
private DataSet ExecuteDataset(ExecuteUnit unit) { DataSet ds = this.DataHelper.ExecuteDataSet(unit.CommandText, unit.Session, unit.DbParams.ToArray()); return(ds); }
private DataSet ExecuteDataset(ExecuteUnit unit, int startIndex, int endIndex, out int totalCount) { DataSet ds = this.DataHelper.ExecuteDataSet(unit.CommandText, unit.Session, startIndex, endIndex, out totalCount, unit.DbParams.ToArray()); return(ds); }
private DataTable ExecuteDatatable(ExecuteUnit unit, int startIndex, int endIndex, out int totalCount) { DataTable dt = this.DataHelper.ExecuteDataTable(unit.CommandText, unit.Session, startIndex, endIndex, out totalCount, unit.DbParams.ToArray()); return(dt); }
private DataTable ExecuteDatatable(ExecuteUnit unit) { DataTable dt = this.DataHelper.ExecuteDataTable(unit.CommandText, unit.Session, unit.DbParams.ToArray()); return(dt); }
private int ExecuteNonQuery(ExecuteUnit unit) { int count = this.DataHelper.ExecuteNonQuery(unit.CommandText, unit.Session, unit.DbParams.ToArray()); return(count); }
private object ExecuteScalar(ExecuteUnit unit) { object obj = this.DataHelper.ExecuteScalar(unit.CommandText, unit.Session, unit.DbParams.ToArray()); return(obj); }
private DbDataReader ExecuteReader(ExecuteUnit unit) { DbDataReader reader = this.DataHelper.ExecuteReader(unit.CommandText, unit.Session, unit.DbParams.ToArray()); return(reader); }