mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 10:27:18 +02:00
Vehicles dictionary updater
This commit is contained in:
1 parent
6a9b69b254
commit
4a11ed61df
11 files changed
+525
-4
No files matched your search
@@ -14,6 +14,7 @@ namespace WotBlitzStatisticsPro.DataAccess
|
||||
private const string ClanRolesCollectionName = "dictionary-clan-roles";
|
||||
private const string AchievementsSectionsCollectionName = "dictionary-achievements-sections";
|
||||
private const string AchievementsCollectionName = "dictionary-achievements";
|
||||
private const string VehiclesCollectionName = "dictionary-vehicles";
|
||||
|
||||
private readonly IMongoDatabase _database;
|
||||
|
||||
@@ -72,5 +73,14 @@ namespace WotBlitzStatisticsPro.DataAccess
|
||||
await dbAchievementSections.DeleteManyAsync(Builders<AchievementDictionary>.Filter.Empty);
|
||||
await dbAchievementSections.InsertManyAsync(achievementDictionary);
|
||||
}
|
||||
|
||||
public async Task UpdateVehicles(List<VehiclesDictionary> vehiclesDictionary)
|
||||
{
|
||||
var dbVehicles =
|
||||
_database.GetCollection<VehiclesDictionary>(VehiclesCollectionName);
|
||||
|
||||
await dbVehicles.DeleteManyAsync(Builders<VehiclesDictionary>.Filter.Empty);
|
||||
await dbVehicles.InsertManyAsync(vehiclesDictionary);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user