Exemple #1
0
        public TeacherToSubjectDTOForAdmin ConvertToTeacherToSubjectDTOForAdmin(TeacherToSubject x)
        {
            TeacherToSubjectDTOForAdmin dto = new TeacherToSubjectDTOForAdmin
            {
                Id              = x.Id,
                Teacher         = teacherToDTO.ConvertToTeacherDTOForAdmin(x.Teacher, (List <IdentityUserRole>)x.Teacher.Roles),
                Subject         = x.Subject,
                StartedTeaching = x.StartedTeaching,
                StoppedTeaching = x.StoppedTeaching
            };

            return(dto);
        }
Exemple #2
0
        public FormDTOForAdmin ConvertToFormDTOForAdmin(Form x)
        {
            FormDTOForAdmin dto = new FormDTOForAdmin
            {
                Id               = x.Id,
                Grade            = x.Grade,
                Tag              = x.Tag,
                Started          = x.Started,
                AttendingTeacher = teacherToDTO.ConvertToTeacherDTOForAdmin(x.AttendingTeacher, (List <IdentityUserRole>)x.AttendingTeacher.Roles),
            };

            return(dto);
        }