示例#1
0
        public static List <DbEntityUser> PaginateSorting(string pageNumber, string totalPageNumber,
                                                          List <string> sortingList)
        {
            string sorting = sortingList != null && sortingList.Count > 0
                ? string.Join(",", sortingList.ToArray())
                : "(SELECT NULL)";

            return(SqlCommandSelectPaginationAndSorting <DbEntityUser>
                   .Execute("users", pageNumber, totalPageNumber, sorting));
        }
示例#2
0
        public static List <T> PaginateSorting <T>(string pageNumber, string totalPageNumber,
                                                   List <string> sortingList) where T : DbEntity
        {
            var tableName = UtilAnnotationTableDb <T> .GetTableName();

            string sorting = sortingList != null && sortingList.Count > 0
                ? string.Join(",", sortingList.ToArray())
                : "(SELECT NULL)";

            return(SqlCommandSelectPaginationAndSorting <T>
                   .Execute(tableName, pageNumber, totalPageNumber, sorting));
        }