public async Task HandleAsync(ExamFinishAttemptCommand command) { var attempt = await _context.ExamAttempt.FirstOrDefaultAsync(x => x.Id == command.AttemptId); attempt.Terminated = true; await _context.SaveChangesAsync(); }
public async Task <IActionResult> FinishAttempt(ExamFinishAttemptCommand command) { await _commandBus.ExecuteAsync(command); return(Ok()); }