public static IList <PostEntity> GetThreadPosts(int tid) { return(EB <PostEntity> .List(QA.DBCS_MAIN, CommandType.Text, "SELECT * FROM forum_post WHERE tid=@tid", new SqlParameter("@tid", tid))); }
public static IList <ContentEntity> List(string tableName) { return(EB <ContentEntity> .List(QA.DBCS_CMS, CommandType.Text, "SELECT * FROM " + tableName + " ORDER BY created DESC")); }
//public IList< public static IList <BoardEntity> GetBoardList() { return(EB <BoardEntity> .List(QA.DBCS_MAIN, CommandType.Text, "SELECT * FROM forum_board WHERE status=0 AND type=2")); }
internal static IList <ThreadEntity> GetThreads() { return(EB <ThreadEntity> .List(QA.DBCS_MAIN, CommandType.Text, "SELECT * FROM forum_thread ORDER BY created DESC")); }
internal static IList <CYEntity> List(int count) { return(EB <CYEntity> .List(DBQA.DBCS_DICT_CY, CommandType.Text, "SELECT TOP " + count + " id, name,pinyinabbr FROM chengyu ORDER BY newid();")); }
public static IList <QuestionEntity> List(int count) { return(EB <QuestionEntity> .List(QA.DBCS_MAIN, CommandType.Text, "SELECT TOP " + count + " id,authorid,good,likes,created,author,title FROM question ORDER BY created DESC")); }
public IList <QuotationEntity> RandomList(int count) { return(EB <QuotationEntity> .List(QA.DBCS_MAIN, CommandType.Text, "SELECT TOP " + count + " * FROM quotation ORDER BY newid()")); }
public static IList <UserCategoryEntity> GetUserCategories(int uid, string tableName) { return(EB <UserCategoryEntity> .List(QA.DBCS_CMS, CommandType.Text, "SELECT id,pid,uid,name,count FROM " + tableName + " WHERE uid=@uid ORDER BY displayorder ASC,id ASC", new SqlParameter("@uid", uid))); }
public static IList <CategoryEntity> GetTopCategories(string tableName) { return(EB <CategoryEntity> .List(QA.DBCS_CMS, CommandType.Text, "SELECT id,pid,name,count FROM " + tableName + " WHERE pid=0 ORDER BY count DESC")); }