Add full-length Step 3 Day 1 simulation
This commit is contained in:
@@ -64,6 +64,16 @@ public class QuestionStore
|
||||
public async Task<List<Question>> GetAllAsync() =>
|
||||
await _col.Find(Builders<Question>.Filter.Empty).ToListAsync();
|
||||
|
||||
public async Task<List<Question>> GetPublishedAsync() =>
|
||||
await _col.Find(question => question.IsPublished).ToListAsync();
|
||||
|
||||
public async Task<Dictionary<string, Question>> GetByExternalIdsAsync(IEnumerable<string> externalIds)
|
||||
{
|
||||
var ids = externalIds.Distinct(StringComparer.Ordinal).ToList();
|
||||
var questions = await _col.Find(question => ids.Contains(question.ExternalId)).ToListAsync();
|
||||
return questions.ToDictionary(question => question.ExternalId, StringComparer.Ordinal);
|
||||
}
|
||||
|
||||
public async Task<(List<Question> Items, string? NextCursor, bool HasMore)> ExportPageAsync(
|
||||
string? after,
|
||||
int requestedLimit)
|
||||
|
||||
Reference in New Issue
Block a user