Пример #1
0
        public async void Setup()
        {
            listStudentGroup.AddRange(StudentGroupMock.listStudentGroup);

            for (int i = 0; i < listStudentGroup.Count; i++)
            {
                DictionaryMocks.cityMock[i].Id = dictionaryStorage.CityAddOrUpdate(DictionaryMocks.cityMock[i]).Result;
                UserMock.listUsers[i].CityId   = (int)DictionaryMocks.cityMock[i].Id;
                UserMock.listUsers[i].Id       = await userStorage.UserAddOrUpdate(UserMock.listUsers[i]);

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

                CourseProgramMock.listCourseProgram[i].CourseId = (int)CourseMock.listCourse[i].Id;
                CourseProgramMock.listCourseProgram[i].Id       = await courseStorage.CourseProgramAddOrUpdate(CourseProgramMock.listCourseProgram[i]);

                GroupMock.groupMocks[i].CourseProgramId = (int)CourseProgramMock.listCourseProgram[i].Id;
                GroupMock.groupMocks[i].Id = groupStorage.GroupAddOrUpdate(GroupMock.groupMocks[i]).Result;
                StudentGroupMock.listStudentGroup[i].UserId  = (int)UserMock.listUsers[i].Id;
                StudentGroupMock.listStudentGroup[i].GroupId = (int)GroupMock.groupMocks[i].Id;
                StudentGroupMock.listStudentGroup[i].Id      = groupStorage.StudentGroupInsert(StudentGroupMock.listStudentGroup[i]).Id;
            }
        }
Пример #2
0
 //Добавить студента в группу
 public async Task InsertStudentGroup([FromBody] StudentGroup model)
 {
     await groupStorage.StudentGroupInsert(model);
 }