public async IAsyncEnumerable <TestResult> GetAllResults() { await foreach (var item in testResultRepository.GetAllAsync()) { yield return(item); } }
private async Task <TestResult> GetExistingTestResult(string testID, User user) { return(await testResultRepository.GetAllAsync() .FirstOrDefaultAsync(x => x.User == user && x.Test.ID == testID)); }