Пример #1
0
        public async Task <int> AddRowAnswerAsync(int fieldDataId, int rowPosition, string input)
        {
            var fieldDataAnswer = await _fieldDataAnswerRepository.GetByIdAsync(fieldDataId);

            var rowAnswer = new RowAnswer(rowPosition, input);

            fieldDataAnswer.AddRow(rowAnswer);
            await _rowAnswerRepository.AddAsync(rowAnswer);

            return(rowAnswer.Id);
        }
        public async Task AddAsync(RowAnswer rowAnswer)
        {
            await _context.RowAnswers.AddAsync(rowAnswer);

            await _context.SaveChangesAsync();
        }