public List <Course> GetAllCourses() { var sectors = new List <Course>(); var sectorDTOs = _courseDAL.GetAll(); foreach (var sectorDTO in sectorDTOs) { sectors.Add(new Course(sectorDTO)); } return(sectors); }
public DataTable GetAll() { try { CourseDAL courseDAL = new CourseDAL(); return(courseDAL.GetAll()); } catch (Exception) { throw; } }
public static List <Course> GetAll(int limit = -1) { List <CourseDTO> coursesDto = CourseDAL.GetAll(limit); List <Course> courses = new List <Course>(); foreach (CourseDTO course in coursesDto) { courses.Add(new Course(course)); } return(courses); }