Use name/count model.

This commit is contained in:
2019-12-03 22:42:49 +00:00
parent e380126937
commit a0fafabb2c
15 changed files with 2329 additions and 42 deletions

View File

@@ -150,12 +150,12 @@ namespace DiscImageChef.Server.Controllers
if(newstats.Versions != null)
foreach(NameValueStats nvs in newstats.Versions)
{
Version existing = _ctx.Versions.FirstOrDefault(c => c.Value == nvs.name);
Version existing = _ctx.Versions.FirstOrDefault(c => c.Name == nvs.name);
if(existing == null)
_ctx.Versions.Add(new Version
{
Value = nvs.name, Count = nvs.Value
Name = nvs.name, Count = nvs.Value
});
else
existing.Count += nvs.Value;