public List <DTO> GetSemesterDatatable() { List <Semester> semesters = semesterDAL.Select(); List <DTO> dtoObjects = new List <DTO>(); foreach (var semester in semesters) { DTO dto = new DTO(); dto.SemesterID = semester.SemesterID; dto.SemesterDescription = semester.SemesterDescription; dtoObjects.Add(dto); } return(dtoObjects); }