Exemplo n.º 1
0
        public ValueTask <Exam> RemoveExamByIdAsync(Guid examId) =>
        TryCatch(async() =>
        {
            ValidateExamId(examId);
            Exam maybeExam = await storageBroker.SelectExamByIdAsync(examId);
            ValidateStorageExam(maybeExam, examId);

            return(await storageBroker.DeleteExamAsync(maybeExam));
        });