コード例 #1
0
        //5.3.2
        public async Task UpdateTest(TestEditDto input)
        {
            BD_Test test = input.MapTo <BD_Test>();

            await SetInstrumentTestsAsync(test.Id, input.InstrumentTestIds);

            await _testRepository.UpdateAsync(test);
        }
コード例 #2
0
        //5.3.1 生成test单据,指定user
        public async Task <long> CreateTest(TestEditDto input)
        {
            BD_Test test = input.MapTo <BD_Test>();

            long newTask_Id = await _testRepository.InsertAndGetIdAsync(test);

            await CurrentUnitOfWork.SaveChangesAsync();

            await SetInstrumentTestsAsync(test.Id, input.InstrumentTestIds);

            return(newTask_Id);
        }