Added tanks stat info operation and calculation tier and Wn7 operation

This commit is contained in:
Mikhail Shabanov committed 2020-09-22 17:54:35 +02:00
1 parent 3eeda15491
commit b343e36e0d
14 files changed
+394 -4

No files matched your search

@@ -91,5 +91,15 @@ namespace WotBlitzStatisticsPro.DataAccess
.FindAsync(Builders<ILanguageDictionary>.Filter.Empty);
return collection.ToList();
}
public async Task<Dictionary<long, int>> GetTankTires(long[] tankIds)
{
var collection = await _database.GetCollection<VehiclesDictionary>(VehiclesCollectionName)
.Find(Builders<VehiclesDictionary>.Filter.In(v => v.TankId, tankIds))
.Project(v => new { TankId = v.TankId, Tier = v.Tier })
.ToListAsync();
return collection.ToDictionary(k => k.TankId, v => v.Tier);
}
}
}