feat: achievements queries added

This commit is contained in:
Mikhail Shabanov committed 2021-03-23 13:44:03 +01:00
1 parent b4e28506ba
commit 310f46b1e7
18 files changed
+505 -45

No files matched your search

@@ -153,5 +153,21 @@ namespace WotBlitzStatisticsPro.DataAccess
return collection.ToDictionary(n => n.ClanRoleId, n => n.ClanRoleValueValue);
}
public async Task<List<AchievementSectionDictionary>> GetAchievementSections()
{
var collection = await _database.GetCollection<AchievementSectionDictionary>(AchievementsSectionsCollectionName)
.FindAsync(Builders<AchievementSectionDictionary>.Filter.Empty);
return collection.ToList();
}
public async Task<Dictionary<string, AchievementDictionary>> GetAchievements(string[] achievementIds)
{
var collection = await _database.GetCollection<AchievementDictionary>(AchievementsCollectionName)
.Find(Builders<AchievementDictionary>.Filter.In(v => v.AchievementId, achievementIds))
.ToListAsync();
return collection.ToDictionary(a => a.AchievementId, a => a);
}
}
}