コード例 #1
0
        public async Task Save(AddStudyAbroadViewModel model, int userId, string remoteIp)
        {
            using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
            {
                await StudyAbroadRepository.Save(model);

                await EventLogService.AddStudentEvent(userId, model.StudentId, EventLogTypes.AddStudentExperience,
                                                      remoteIp);
            }
        }
コード例 #2
0
        public async Task InsertStudent(StudentModel model, UserModel user, string remoteIp)
        {
            using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
            {
                int studentId = await StudentRepository.InsertStudent(model);

                model.Id = studentId;

                await StudentPromoRepository.Save(model.Id, model.PromoIds);

                await EventLogService.AddStudentEvent(user.Id, studentId, EventLogTypes.AddStudent, remoteIp);

                scope.Complete();
            }
        }
コード例 #3
0
        public async Task InsertNote(int userId, AddStudentNoteViewModel model, string remoteIp)
        {
            using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
            {
                await StudentNoteRepository.InsertNote(userId, model);

                await EventLogService.AddStudentEvent(userId, model.StudentId, EventLogTypes.AddStudentNote,
                                                      remoteIp);

                scope.Complete();
            }
        }