This commit is contained in:
2021-06-29 19:49:55 +00:00
parent e34f4773c6
commit d15964d028

View File

@@ -6,6 +6,7 @@ using AyaNova.Api.ControllerHelpers;
using AyaNova.Models;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Microsoft.Extensions.Logging;
namespace AyaNova.Biz
{
@@ -329,6 +330,18 @@ namespace AyaNova.Biz
TrackRequestedKey(param);
#endif
var ret = await ct.TranslationItem.Where(z => z.TranslationId == UserTranslationId && param.Contains(z.Key)).AsNoTracking().ToDictionaryAsync(z => z.Key, z => z.Display);
#if (DEBUG)
if(ret.Count!=param.Count){
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger<TranslationBiz>();
var missingItems = param.Where(p => ret.All(p2 => p2.Key != p));
log.LogError($"********* GetSubsetAsync Non existant keys requested: {string.Join( ",", missingItems)}");
}
#endif
return ret.ToList();
}