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