internal static List <T> Execute(string tableName)
        {
            StringBuilder query = new StringBuilder();

            query.Append($"SELECT * FROM {tableName}");

            return(SqlCommandExecuteQueryForSelect <T> .Execute(query.ToString()));
        }
        internal static List <T> Execute(string tableName, string columnAndValueFilter)
        {
            StringBuilder query = new StringBuilder();

            query.Append($"SELECT * FROM {tableName} ");
            query.Append($"WHERE {columnAndValueFilter}");

            return(SqlCommandExecuteQueryForSelect <T> .Execute(query.ToString()));
        }
Beispiel #3
0
        internal static List <T> Execute(string tableName,
                                         string pageNumber,
                                         string totalPageNumber)
        {
            StringBuilder query = new StringBuilder();

            query.Append($"SELECT * FROM {tableName} ");
            query.Append($"ORDER BY(SELECT NULL) ");
            query.Append($"OFFSET {pageNumber} * {totalPageNumber} ROWS ");
            query.Append($"FETCH NEXT {totalPageNumber} ROWS ONLY;");

            return(SqlCommandExecuteQueryForSelect <T> .Execute(query.ToString()));
        }
Beispiel #4
0
        internal static List <T> Execute(string tableName,
                                         string pageNumber,
                                         string totalPageNumber,
                                         string sorting,
                                         string columnAndValueFilterLike)
        {
            StringBuilder query = new StringBuilder();

            query.Append($"SELECT * FROM {tableName} ");
            query.Append($"WHERE {columnAndValueFilterLike} ");
            query.Append($"ORDER BY {sorting} ");
            query.Append($"OFFSET {pageNumber} * {totalPageNumber} ROWS ");
            query.Append($"FETCH NEXT {totalPageNumber} ROWS ONLY;");

            return(SqlCommandExecuteQueryForSelect <T> .Execute(query.ToString()));
        }