Exemplo n.º 1
0
        public async Task Setup()
        {
            listTeacherGroup.AddRange(TeacherGroupMock.listTeacherGroup);


            listCity          = DictionaryMocks.cityMock;
            listUser          = UserMock.listUsers;
            listCourseProgram = CourseProgramMock.listCourseProgram;
            listGroup         = GroupMock.groupMocks;
            listCourses       = CourseMock.listCourse;



            for (int i = 0; i < listTeacherGroup.Count; i++)
            {
                listCity[i].Id = await dictionaryStorage.CityAddOrUpdate(listCity[i]);

                listUser[i].CityId = (int)listCity[i].Id;
                listUser[i].Id     = await userStorage.UserAddOrUpdate(listUser[i]);

                listCourses[i].Id = await courseStorage.CourseAddOrUpdate(listCourses[i]);

                listCourseProgram[i].CourseId = (int)listCourses[i].Id;
                listCourseProgram[i].Id       = await courseStorage.CourseProgramAddOrUpdate(listCourseProgram[i]);

                listGroup[i].CourseProgramId = (int)listCourseProgram[i].Id;
                listGroup[i].Id = await groupStorage.GroupAddOrUpdate(listGroup[i]);

                listTeacherGroup[i].UserId  = (int)listCity[i].Id;
                listTeacherGroup[i].GroupId = (int)listGroup[i].Id;
                listTeacherGroup[i].Id      = await groupStorage.TeacherGroupInsert(listTeacherGroup[i]);
            }
        }
Exemplo n.º 2
0
 //Добавить учителя для группы
 public async Task TeacherGroupInsert([FromBody] TeacherGroup model)
 {
     await groupStorage.TeacherGroupInsert(model);
 }