Пример #1
0
        public virtual List <student> Select(int ID = 0)
        {
            var sql = "SELECT * FROM student ";

            if (ID == 0)
            {
                return(MysqlManager <student> .ExecuteReader(sql));
            }
            sql += " WHERE ID=@ID";

            return(MysqlManager <student> .ExecuteReader(sql, new { ID = ID }));
        }
Пример #2
0
        public virtual List <student> SelectPaging(int start = 0, int end = 10)
        {
            var sql = "SELECT * FROM student LIMIT @start, @end;";

            return(MysqlManager <student> .ExecuteReader(sql, new { start = start, end = end }));
        }