Пример #1
0
        public async Task HandleAsync(ExamFinishAttemptCommand command)
        {
            var attempt = await _context.ExamAttempt.FirstOrDefaultAsync(x => x.Id == command.AttemptId);

            attempt.Terminated = true;
            await _context.SaveChangesAsync();
        }
Пример #2
0
        public async Task <IActionResult> FinishAttempt(ExamFinishAttemptCommand command)
        {
            await _commandBus.ExecuteAsync(command);

            return(Ok());
        }