private void GetListOperation() { switch (view.entity) { case Entity.Junction: List <Junction> junctions = junctionDAO.GetList(); view.PrintJunctions(junctions); break; case Entity.Pupil: List <Pupil> pupils = pupilDAO.GetList(); view.PrintPupils(pupils); break; case Entity.Teacher: List <Teacher> teachers = teacherDAO.GetList(); view.PrintTeachers(teachers); break; } }