/// <summary> /// By default queries the table matching the class name. /// This uses your raw SQL so be careful to not create SQL injection holes. /// </summary> /// <typeparam name="T"></typeparam> /// <param name="pageNumber"></param> /// <param name="rowsPerPage"></param> /// <param name="conditions"></param> /// <param name="orderby"></param> /// <param name="parameters"></param> /// <returns></returns> public IEnumerable <T> GetListPaged <T>(int pageNumber, int rowsPerPage, string conditions = null, string orderby = null, object parameters = null) { SetSimpleCRUD(); using (var conn = new SqlConnection(_connectionString)) { conn.Open(); IEnumerable <T> ret = _simpleCRUD.GetListPaged <T>(conn, pageNumber, rowsPerPage, conditions, orderby, parameters); conn.Close(); return(ret); } }
public virtual IEnumerable <TModel> GetListPaged(int pageNumber, int rowsPerPage, string conditions, string orderby, object parameters = null, IDbTransaction transaction = null, int?commandTimeout = null) { return(SimpleCRUD.GetListPaged <TModel>(_connection, pageNumber, rowsPerPage, conditions, orderby, parameters, transaction, commandTimeout)); }