Exemplo n.º 1
0
        public static List <Lesson> GetAllLessons()
        {
            List <Lesson> output = new List <Lesson>();

            DataSet ds = BDManager.SqlQuery("SELECT * FROM Lessons");

            foreach (DataTable dt in ds.Tables)
            {
                foreach (DataRow row in dt.Rows)
                {
                    output.Add(Lesson.parseFromDB(row));
                }
            }

            return(output);
        }