コード例 #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
ファイル: ExamController.cs プロジェクト: anbu06/lms
        public async Task <IActionResult> FinishAttempt(ExamFinishAttemptCommand command)
        {
            await _commandBus.ExecuteAsync(command);

            return(Ok());
        }