public bool AddTeacherToGroup(int groupId, int teacherId)
        {
            Group   group   = context.Groups.FirstOrDefault(x => x.Id == groupId);
            Teacher teacher = context.Teachers.FirstOrDefault(x => x.Id == teacherId);

            if (group != null && teacher != null)
            {
                GroupTeacher groupTeacher = context.GroupTeachers.FirstOrDefault(x => x.GroupID == groupId && x.TeacherID == teacherId);
                if (groupTeacher != null)
                {
                    return(false);
                }
                GroupTeacher newGroupTeacher = new GroupTeacher()
                {
                    GroupID = group.Id, TeacherID = teacher.Id
                };
                context.GroupTeachers.Add(newGroupTeacher);
                var result = context.SaveChanges();
                if (result > 0)
                {
                    return(true);
                }
            }
            return(false);
        }
        public bool DeleteTeacherFromGroup(int groupId, int teacherId)
        {
            GroupTeacher groupTeacher = context.GroupTeachers.FirstOrDefault(x => x.GroupID == groupId && x.TeacherID == teacherId);

            if (groupTeacher != null)
            {
                context.GroupTeachers.Remove(groupTeacher);
                var result = context.SaveChanges();
                if (result > 0)
                {
                    return(true);
                }
            }
            return(false);
        }